Java Language Fundamental
1.
Identifiers
2.
Reserved words
3. Data Types
4. Literals
5. Arrays
6. Type Of variables
7. Var-args method
8. Main method
9. Command Line arguments
10. Java coding standards
Identifiers :- A name in java program called
Identifiers .
It can be class
name or variable name or method name or label name.
Ie:-
class Test {
public static void main (String [] args){
int x=0;
}
}
// Here Test, main and x is identifiers.
Rule to define Identifiers :-
The Allowed character in java are :
·
A to Z
·
a to z
·
0 to 9
·
_
·
$
1.If we are using only other character,
we will get compiler error.
Ie:
All#(false)
098_10(false)
_$_$(true)
2.Identifier can not start with digit
and after that character.
Ie :
123total
(false)
Total123(true)
3. Java Identifier are case sensitive
4. Java Identifier do not have length limit
, But It’s not recommended to take more
than 15 length.
5. Reserved words can’t be used as
identifiers.
6. All predefine Java classes and Interface
name we use as Identifiers even though
it is legal but it is not recommended.
Ie:
Class Test {
int
String=10;
System.out.println(String);
// out put 10
}
No comments:
Post a Comment