your problem is with function run
This is what you have done
public void run()
{
someClass[][] sc = new someClass[1][2];
System.out.println(sc[0][0].getX());
}
in other word
sc[0][0] = new someClass();
When you declare an array of primitive variables, java set default value for that variable. And for all classes and String default is null. Follow the example to understand better
public class Klass {
public int x=10;
public static void main(String []args) {
int []i = new int[2];
char []c=new char[2];
Klass []k=new Klass[2];
String s[] = new String[2];
System.out.println(i[0] + " " + i[1]);
System.out.println(c[0] + " " + c[1]);
System.out.println(s[0] + " " + s[1]);
System.out.println(k[0] + " " + k[1]);
try {
System.out.println(k[0].x);
} catch(NullPointerException e) {
e.printStackTrace();
}
k[0] = new Klass();
System.out.println(k[0].x);
}
}