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

Can we override private constructor in java?

978


What is the maximum size of array in java?

985


What is <> used for in java?

1116


What are methods and how are they defined?

1212


What is assembly condition codes?

990


Can we override constructor in java?

1096


What is the purpose of lambda expressions?

1059


What is meant by memory leak?

1075


What is string :: npos?

1089


What is binary search in java?

996


why using interface interface ?

2046


What is a ternary operator in java?

982


What is the Scope of Static Variable?

1235


How can you read content from file in java?

1006


Explain polymorphism citing an example.

1043