Friday, July 16, 2010

Java Programming Language

A java program is mostly a collection of objects talking to other by invoking each other's methods. Every object is of a certain type,and that type is defined by a class or an interface.most java programs use a collection of objects of many different types.
  • Class-A template that describe the kind of state and behavior that objects of its type support.
  • Object- At runtime,when the java virtual machine (JVM) encounters the new keyword,it will use the appropriate class to make an object which is an instances of that class.That object will have its own state,and access to all of the behaviors defined by its class.
  • State(instance variables)-each object (instance of a class) will have its own unique set of instance variables as defined in class. Collectively, the values assigned to an objects's instance variables make up the object's state.
  • Behaviors(methods)- when a programmer create a class,he creates methods for the class.methods are where the real works gets done.They are where algorithms get executed,and data gets manipulated.


No comments:

Post a Comment