import java.io.IOException;
public class Tambalooloo {
public static class TambaloolooException extends Exception {}
static class X {
void f() {
System.out.println("X::f");
}
}
static class Y extends X {
@Override
public void f() {
System.out.println("Y::f");
}
}
public static void main(String[] args) throws Exception {
X[] arr = new X[2];
arr[0] = new X();
arr[1] = new Y();
if(((char)System.in.read()) == 'c') {
throw new TambaloolooException();
}
((Y)arr[0]).f();
}
}
After hitting
Ctrl + 6
on the following code, I've got a "TV Error
": http://ssdlbugquery.cs.technion.ac.il/stacks/316