Most importantly, you need to change
randomScore = (int) Math.random() * 1000;
to
randomScore = (int) (Math.random() * 1000);
^ ^
since it (int) Math.random()will always be 0.
Another important thing to note is that the main thread continues and prints the value randomScore, without waiting for another thread to change the value. Try adding Thread.sleep(100);after startor student.join()to wait until the student stream ends.
You should also be aware that the Java memory model allows threads to cache their values for variables. Perhaps the main thread has cached its own value.
randomScore volatile:
public static volatile int randomScore;