Monday, April 30, 2012

regarding constructors

i was developing the below code....



class P {
//public P(){}
public P(int i) {

}
}

class D extends P {
public D(){ // default constructor must be defined in super class

}
}

public class agf {
public static void main(String[] args) {

}
}


Now in class p explicit parametrized constructor is defined and in class D default constructor is defined but it is still showing the compile time error ,please explain





No comments:

Post a Comment