我试过这个:
InputStream file = Test.class.getResourceAsStream("highScore.txt");
BufferedReader br = new BufferedReader (new InputStreamReader(file));
String text;
text = br.readLine();
while (text!=null) {
System.out.println (text);
}
但我得到NullPointerException
错误。