Keywords
Keywords are the predefined words in a program,we can't alter the meaning of keywords.
Ex:- for,do,if,class,public.
There are almost 62 keywords are in java
Identifiers
Which is used to give name for a variable or class or methods.
Rules for a valid identifier are,
*identifiers name must need to begin with an alphabet not by a number.(i.e. 1name is invalid name1 is valid)
*Keywords will not be an identifier
*Case sensitive, upper case and lower case are treated differently
(if you have a variable HELLO and hello, system will treat both in differently)
Keywords are the predefined words in a program,we can't alter the meaning of keywords.
Ex:- for,do,if,class,public.
There are almost 62 keywords are in java
Identifiers
Which is used to give name for a variable or class or methods.
Rules for a valid identifier are,
*identifiers name must need to begin with an alphabet not by a number.(i.e. 1name is invalid name1 is valid)
*Keywords will not be an identifier
*Case sensitive, upper case and lower case are treated differently
(if you have a variable HELLO and hello, system will treat both in differently)
Comments
Post a Comment