What are the default and parameterized constructors?



What are the default and parameterized constructors?..

Answer / Vidit Goyal

A default constructor is a no-argument constructor that is automatically generated by the compiler if no user-defined constructors are provided. A parameterized constructor, also known as an overloaded constructor, has one or more arguments in its constructor declaration and is used to initialize objects with specific initial values.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Why method overloading and method overriding required in java?

1 Answers   Ericsson, Wipro,


When garbage collector invokes object?s finalize() method?

5 Answers  


What is dynamic binding(late binding)?

1 Answers  


If system.exit (0); is written at the end of the try block, will the finally block still execute?

1 Answers  


What is difference between word and integer?

1 Answers  


what is the context

2 Answers  


How does multithreading take place on a computer with a single cpu?

1 Answers  


What is the biggest integer?

1 Answers  


How to compare strings in java?

1 Answers  


Explain the protected field modifier?

1 Answers  


Why is multithreading important?

1 Answers  


What does || mean in vectors?

1 Answers  


Categories