I am very new to Java and trying to learn the subject, having previous programming exposure in only HTML/CSS. I have started with Herbert Schildt and progressed through a fe
You may have several variables in a class... But you want to initialize only few(one or two) variables at the time of object creation. So in this case Its always better to have overloaded constructors so that you can call respective constructor depends on your requirement. One thing you should remember always,.. while overloading constructors always provide a default constructor(Zero argument constructor).Even with empty implementation.