class Archer {
public void finalize(){
System.out.println("finalizing");
}
}
public class Shula{
String[] sa= new String[10];
public static void main(String argv[]){
new Shula();
}
public Shula(){
String s = new String("Shula");
int i = 99;
i = null;
Archer a = new Archer();
a=null;
System.gc();
}
}
1. Compile time error
2 Compilation and output of "finalizing" at runtime
3 Compilation but no output at runtime
4 Compilation but runtime exception
The Correct Answer is
1) Compile time error.
Please explain this
saource :http://www.examulator.com
