Wednesday, March 12, 2014

what is java

What is java?
Java is simple,Object Oriented and Platform independent.

Java Basic Syntax:
Object - Objects have state and behaviors.An object is an instance of a class.
Example;- A bird has states-color,name as well as behaviors eating
Class - A class can be defined as a template/ blue print that describe the behaviors.
Method - A class contain many method. it is in where the logic are written,data is manipulated and all the actions are executed.
Instant Variables - Each object has its unique set of instant variables. an object`s state is created by values assigned assigned to these instant variables.

First java Program:-
public class MyFirstJavaProgram {
public static  void main(String []args) {
System.out.println("Hello");//print hello word
}
}