Java.....
A simple language. But it is used in world wide because of its features.
Yes. It is versatile and
portable. It is famous by its robustness.
Who developed Java??
Java is developed by James Gosling at Sun Microsystems at
1991.
What is java?
Java is a high level and Object Oriented Language. It has JVM(Java
Virtual Machine) which is a unique feature in java.
What is JVM?
It is the run time environment which is used to execute the
java byte codes. It has following steps.
·
First, the class files are loaded into JVM.
·
Next, it checks the byte codes whether it meets
the java constraints.
·
If the constraints met, interpreter executes the
code line by line.
·
Finally, Just In Time compiler converts the byte
code to machine code.
·
Garbage collector
frees the memory.
Java Editions:
Java editions can be classified into three types.
·
JSE(Java Standard Edition)- It develops Desktop
applications
·
JEE(Java Enterprise Edition) – It develops Large
scale, distributed applications.
·
JME(Java Micro Edition) – It develops applications
for small devices like mobile phones.
Basic structure of Java Program:
Basic structure of java program contains a class associated
with a main function.
Syntax:
class class_name
{
public static void
main(String args{})
{
Statements………..
}
}
Let us quote with an example.
class first
{
public static void main(String args[])
{
System.out.println(“Welcome
to Java coding”)
}
}
First, compile this program.
>javac first.java
It converts your java file to class file.
Next, run the class file.
>java first
It shows the output
What are the variables?
Variables
are containers which is used to store the data. To Declare a variable, follow
this syntax.
Datatype variable_name;
Eg:
int a;
String b;
To initialize a variable, assign a value to the variable.
Eg:
a = 10;
b = “Sample”;
This is a simple introduction about java Programming.
http://rajeeva84.blogspot.com/search/label/JavaProgramming
No comments:
Post a Comment