+ 3

Constructor can be overloadded

but remember it canot have return type and when overloading constructor it must have defferent parameter.

3rd Feb 2018, 2:47 AM
Shahid Khan Sahibzada
Shahid Khan Sahibzada - avatar
1 ответ
+ 15
U mean we can make constructors with same name //yeah , i have tried doing that /*I made 1 parameterised & 1 non-parameterised constructor*/ //U can try in code playground
3rd Feb 2018, 5:04 AM
Gaurav Agrawal
Gaurav Agrawal - avatar