Monday, May 26, 2008

Java Constructor

Constructors
A constructor is a piece of code that runs when an instance of an object is created. A constructor is indicated by a method that:
Has the same name as the object
Has no return type specified

1 comment:

[URL=http://s06.flagcounter.com/more/dwjl][IMG]http://2.s06.flagcounter.com/count/dwjl/bg=FFFFFF/txt=000000/border=CCCCCC/columns=2/maxflags=12/viewers=0/labels=0/[/IMG][/URL] said...

Java is an Object Oriented language in the sense every thing in java is OBJECT based. In general Object means anything like car, scooter, bus, radio, TV.

There are 3 basic properties for java Language. You can remember by the Phrase/word "PIE".
P---> Polymorphisam
I---->Inheritence
E---->Encapsulation.

we will discuss one by one.