Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what diff bw constructor method & method

Answer Posted / sowjanya

constructor is special method with the basic initialization
information of the class variables.this constructor is
accessed at the time of object creation .from this object is
created with initial assignment values of variables. and we
can't call constructor separately.
if you have more than one constructor default constructor is
invoked at the object creation time and we can call other
constructor as we need .
constructor name is same as class name this is way to
identify methods is constructor.
methods are not invoked not default we call that as we
need.method name is not a class name.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why oracle type 4 driver is named as oracle thin driver?

905


What is war file in java?

1019


What is reflection in java?

1053


What is @resource annotation in java?

968


How do I run a java program from the command line?

1022


Explain the encapsulation principle.

965


What is stateless and stateful in java?

1072


What is log4j in java?

957


What is gpt and gpc? : java security

1064


What are messages in java?

1038


Which version of my browser should I use? : java security

996


Why doesn't lsdou work under windows nt? : java security

940


differences between iterator and spliterator in java se 8?

988


What is cookie in java?

929


Explain the inheritance principle.

980