Shuttleu
2010-09-22 13:53:58
well i just started learning java again and i forgot nearly everything
anyway so far i have this
any ideas are welcome
~shut
anyway so far i have this
class First {
int x = 2;
}
public class Main {
public static void main(String[] args)
{
First[] testing = new First[5];
testing[2].x = 5;
System.out.println(testing[2].x);
}
}
it compiles fine but when i run it i get Exception in thread "main" java.lang.NullPointerException
at Main.main(Main.java:11)
any ideas are welcome
~shut