What will be the output of the following program?
public class FinallyFinalize {
public static void main(String[] args) {
A a = new A(1);
a = null;
a = new A(2);
a = null;
System.gc();
try {
Thread.sleep(-15);
} catch (Exception ex) {
System.out.print("E");
}
a = new A(3);
}
}
class A {
int i;
public A(int i) {
this.i = i;
System.out.print("O" + i);
}
protected void finalize() throws Throwable {
System.out.print("F" + i);
super.finalize();
}
}