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

Explain, why the constructor is required in implemented
class?

Answer Posted / snehaaa

when u have the class name like bicycle,how u'l initialize the values for bicycle with different 1 parameters,2 parameters,
3 parameters by using object?. for that u'l create example like 3 parameter constructors -> bicycle(speed,wheels,gear)and cal this constructor like bicycle b=new bicycle(10,2,4); this is use of constructor to initialize the values for class

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are 4 pillers of object orinted programming?

943


what is abstract class in Java?

1066


Explain about anonymous inner classes ?

1013


What is ascii code?

1154


What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?

896


1.IN CASE OF DYNAMIC METHOD DISPATCH WHY WE USE REFERENCE VARIABLE,WE CAN USE THE DIFFERENT DEFINED OBJECT DIRECTLY TO ACCESS THE DATA MEMBER AND MEMBER FUNCTION OF THAT RESPECTIVE CLASS?WHAT IS THE MAIN FUNCTION OF "REFERENCE VARIABLE" HERE?

4812


Explain java coding standards for methods?

980


What's the purpose of static methods and static variables?

1032


Is void a type?

927


What restrictions are placed on method overriding?

1099


What do you mean by an interface in java?

962


Are registers volatile?

881


How do you declare an array that will hold more than 64KB of data?

1189


How to find the index of the largest number in an arraylist java?

960


How can a gui component handle its own events?

1041