Java, Android software development [Part-39] :: Know the rules for writing the Java Identifier and Identifier

in #technology9 years ago

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

  1. Keywords can not be written with. Eg int float double

  2. Numeric numbers can not be started with such a. 1num 2num 3num

  3. No special codes can be used without dollar signs and under scraps. Eg: & num # num

  4. 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.

Sort:  

This post recieved an upvote from minnowpond. If you would like to recieve upvotes from minnowpond on all your posts, simply FOLLOW @minnowpond

Coin Marketplace

STEEM 0.05
TRX 0.33
JST 0.079
BTC 63481.02
ETH 1684.55
USDT 1.00
SBD 0.42