+ 1
What is constructor overloading?
write?
5 Antworten
+ 6
It is nearly the same thing as function overloading.
You create 2 or more constructor of the same name, and make them take in different amount/types of arguments.
+ 5
class Program{
Program(){
}
Program(int number){
}
Program(double decimal){
}
Program(String str){
}
}
+ 1
ok
0
Constructor overloading is like creating more than one constructor for same class
0
ok