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 / ravikiran

constructor is used to initialize the variables during the
creation of instances.
If there is no constuctor no object will be gets created.

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different ways to handle exceptions?

1046


What is a treeset class?

1060


What is OOP Language?

1118


Explain the access modifiers for a class, method and variables?

1181


What is the main use of java?

1219


What is a package in java? List down various advantages of packages.

1337


What are access specifiers in java ?

1197


What is flush () in java?

1065


How are this() and super() used with constructors in java programming?

1114


What is functional interface in java example?

1050


If a class is declared without any access modifiers, where may the class be accessed in java programming?

1289


Differentiate between stringbuffer and string?

1070


What is an argument java?

1021


How to obtain a performance profile of java program

1094


What are the differences between abstract class and interface?

1153