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 is flush () in java?

967


What is a parameter in java?

957


how to open and edit XML file in Weblogic???

1939


Explain the difference between map and flatmap stream operation?

1206


List two java ide’s?

998


Why 1 is not a prime number?

983


Write a program to print 15 random numbers using foreach of java 8?

897


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread

967


what methods would you overwrite in java.lang.object class?

961


How does queue work in java?

942


What is java basic concept?

980


What does the “final” keyword mean in front of a variable? A method? A class?

952


What is a layout manager and what are different types of layout managers available in java awt?

1210


Explain how can you debug the Java code?

1011


I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?

940