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...

why the constructor should be used in class,if there is no
constructor what will happen?

Answer Posted / bindhu

In Java, initialization of every object possible
by providing a constructor. If a class has a constructor,
Java automatically calls that constructor when an object is
created. So initialization is guaranteed.

If we don't define a constructor for a class, a default
parameterless constructor is automatically created by the
compiler.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the messsage u r going to get from an objectoriented programing?

2149


Is java good for beginners?

1058


Can extern variables be initialized?

992


Is java a compiler?

1020


What is dot operator?

1092


What is a java predicate?

1017


What are the 6 mandatory procedures for iso 9001?

1091


Is arraylist ordered in java?

1170


What does arrays sort do in java?

1082


How finally used under exception handling?

988


Which is faster set or list in java?

1077


How to overcome the exception object reference not set to an instance of object?

1202


What is a container in a gui?

1040


What is the major advantage of external iteration over internal iteration?

1151


What is the purpose of using java.lang.class class?

1058