Hi, my program reads out of a textfile containing about 20 hockey players. At the beginning of the program, the user is given the option to sort by name, rating, club or position. No matter what I press, I always get a nullpointerexception error. This never happened before and the program works fine on my friends computer, it also used to work fine on mine and then I randomly got this error. What do I do to fix this?
This is what is says in the bluej thingy
java.lang.NullPointerException
at java.lang.String$CaseInsensitiveComparator.compare (String.java:1217)
at java.lang.String$CaseInsensitiveComparator.compare (String.java:1211)
at java.lang.String.compareToIgnoreCase(String.java:1 258)
at FINAL.sort(FINAL.java:206)
at FINAL.options(FINAL.java:48)
at FINAL.main(FINAL.java:41)