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 try-with-resources in java?
What is treeset and treemap in java?
What restrictions are placed on method overloading?
What is integer size in java?
What is integer valueof?
What is meant by interface?
What do the thread?class methods run() and start() do?
Does sprintf add a null terminator?
What do you understand by Header linked List?
What is data movement?
What is thread pool? How can we create thread pool in java?
What is regex in java?
What is the purpose of the System class?
Where can i get Latest SUN Certification Dumps and what are the Sun Certification Codes that are available, Im new to JAVA, so please gimme info as i need to write J2EE - Core Java Certification
What is difference between overloading and overriding in java?