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
What is the size of arraylist in java?
How java enabled high performance?
What are bind parameters?
what do you mean by java annotations?
Java is Pass by Value or Pass by Reference?
What is java objectoutputstream?
What is the difference between Java Program Constructor and Java Program Method, What is the purpose of Java Program constructor Please Explain it Breafily?
What are the major drawbacks of external iteration?
Is 0 an irrational number?
What are basic data types?
What is the difference between stream and buffer?
How do you override a private method in java?
How can you avoid serialization in child class if the base class is implementing the serializable interface?
What is port number in java?
What does the ‘static’ keyword mean? Is it possible to override private or static method in java?