import java.util.ArrayList;
class Program
{
class Person
{
public Person partner;
}
class Prostitute extends Person { }
class Eunich extends Person { }
private Prostitute prostitute;
private Eunich eunich;
public static void main(String[] args) {
Program p = new Program();
p.run();
}
public void run() {
eunich.partner = prostitute;
}
}
> Exception in thread "main" java.lang.NullPointerException
But if you do, you should check out the nifty online JXXX Compiler Service.