Java, Android software development [Part-39] :: Know the rules for writing the Java Identifier and Identifier
Today we will know about identity fire.
What is an identifier?
Identifier is class, variable, package, method, interface name. There are some rules for writing this identifier, we have to abide by it.
The following rules are given.
Rules of writing identifier
Keywords can not be written with. Eg int float double
Numeric numbers can not be started with such a. 1num 2num 3num
No special codes can be used without dollar signs and under scraps. Eg: & num # num
Identity can not be kept in the middle of it such as: num ber num twor Eclipse.
Some Valid Identifier:
int sum
int num
int _a;
int $ sum
int number;
int num2num;
int sum2;
int sum3;
Some Un Valid Identifier
int 2num
int 3num
int 5num
int & d
int & sum
int & ar
int @ s
int # asif
int # numbertwo
int num two
int num three
int num five
Let's know if you do not understand it.
This post recieved an upvote from minnowpond. If you would like to recieve upvotes from minnowpond on all your posts, simply FOLLOW @minnowpond