posted 21 years ago
For option b to work, just a constructor in class B calls superclass constructor is not enough,
// try B(){ super();}, still fails
Because A(int) defined in class A, and B is subclass of A, we are forced to provide "super(int)" in constructor of class B so compiler won't complain.
Originally posted by Basanti Mathad:
Hey chi,
u mean to say for the 2nd option to work,we need to have a constructor in class B which calls super class constructor? <- super class constructor with 'int' parameter
Thank u guys....
basanti
[ January 17, 2003: Message edited by: chi Lin ]
not so smart guy still curious to learn new stuff every now and then