Define Constructor Overloading In Java With Example
Answers
Answered by
45
Explanation:
☆ ❣ Heya mate here is your answer :
☆ ❣ A constructor is a special method that is used to initialize a newly created object and is called just after the memory is allocated for the object. It can be used to initialize the objects to desired values or default values at the time of object creation. It is not mandatory for the coder to write a constructor for a class.
☆ Example 1: Create your First Constructor Java.
☆ Example 2: To understand Constructor Overloading.
☆ ❣ Hope it helps uh..... ☺️
# FOLLOW ME ❣....
Answered by
0
Answer:
constructor overloading in Java is a technique of having more than one constructor with different parameter list they are arranged in a way that each constructor perform the different tasks they are differentiated by the compiler by the number of parameters in the list and their types.
Similar questions
Math,
5 months ago
Social Sciences,
5 months ago
History,
10 months ago
Physics,
10 months ago
Environmental Sciences,
1 year ago
Psychology,
1 year ago