class Craven{
Craven(){
System.out.println("Craven");
}
}
public class CilDig extends Craven{
public static void main(String argv[]){
CilDig _c = new CilDig();
}
public CilDig(){
System.out.println("CilDig");
}
}
1Compile time error, an object reference cannot start with underscore
2 Compilation and output of "CilDig"
3 Compilation and output of "Craven" followed by "CilDig"
4 Compile time error, method CilDig has no return type
No comments:
Post a Comment