Saturday, 10 September 2011

diferents between awt and swing? java interview questions...

write your answers here?

what is class? java interview questions....

Ans:
  •  java class is a specification of how to construct something and also called template.
  •  Java classes contain multiple fields , variables and methods.
  • The structure of a class and its subclasses is called the class hierarchy.

syntax:

         class classname{

              //tour own code

         }

what is polymorphism? java interview questions....

Ans:

  •  ablity to make more then one form for same function.
  • ability to process objects differently depending on their data type or class    
  • the characteristic of being able to assign a different meaning or usage for same function.
  • it's used to code reusability.

There are two types of polymorphism,
  1.  overloading
  2.  overriding