i am beginning to learn programming and started java.
so sometimes i see codes like:
Shape ball= new Shape();.// takes no parameter Shape ball= new Shape(1,2); //takes parameter
So if there's like more than one constructor(or methods) in the subclass, how do you know which parameters to take?


LinkBack URL
About LinkBacks
Reply With Quote
overloading. Thank you