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 are 4 pillers of object orinted programming?
what is abstract class in Java?
Explain about anonymous inner classes ?
What is ascii code?
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 ?
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?
Explain java coding standards for methods?
What's the purpose of static methods and static variables?
Is void a type?
What restrictions are placed on method overriding?
What do you mean by an interface in java?
Are registers volatile?
How do you declare an array that will hold more than 64KB of data?
How to find the index of the largest number in an arraylist java?
How can a gui component handle its own events?