1.

(e) Create object of class Figure using parameterized constructor. It has two instance variables namely (of string type) and area (of type int).[​

Answer»

Can we have both default CONSTRUCTOR and parameterized constructor in the same class?When you DEFINE another constructor in your class, you do not GET the "usual" default constructor (public and without arguments) anymore. ... The CONSTRUCTORS can call each-other (using this(PARAMETERS) ) or shared methods if there is common functionality in



Discussion

No Comment Found