Java Language Fundamentals
Hi guys, here comes the third article in the series of Java articles series. In this article basically we will be talking about basic terminologies in Java Programming language.
To prepare a java application, we need some fundamentals entities provided by the Java Programming Language. They are
int a = b +c *d;
int a = 10;
int --> Data Type
a ---> variable(identifier)
= --> Operator
10 --> Constant
; --> Terminator
int eno= 101; //valid
int 2eno = 102; // Invalid
String _eaddr = "Bangalore";// Valid
float $esal = 78000.00f;// Valid
String emp9no = "E-IN-090" //Valid
String emp_Name = "Dipika" // Valid
float emp2$Sal= 547793.00f // Valid
Recommended by LinkedIn
int empNo = 222;//valid
int emp+No = 343;//
String emp*Name = 'dipika' // Invalid
String emp@Bangalore = 'dipika' //Invalid
String emp.Addr = 'Bangalore'// Invalid
String emp_Addr = "Bangalore" // Valid
class Identifiers{
public static void main(String[] args){
int Exception = 10;
System.out.println("the exception value is:" + Exception);
}
}
>javac identifiers.java
>java Identifiers
the exception value is:10
//using any predefined class , variable, methods as a custom identifier
class Custom_Identifier{
public static void main(String[] args){
int Exception = 10;
int System = 20;
//System.out.println("the exception value is:" + Exception);
java.lang.System.out.println("The exception value is : " + Exception);
java.lang.System.out.println("The system value is : " + System);
}
}
String ppp = "dipika" // not suggested
String name = "dipika" // suggested
String permanentaddresofBangalore = "HSR Layour"// not suggestible/ recommended
String permAddrBlore = "JayaNagar"// recommended
String permAddrBlore = "JayaNagar"// not recommended
String perm_Addr_Blore = "Majestic"// recommended