Answer the question
In order to leave comments, you need to log in
You need to write a .txt document parser and sort it. The parser itself seems to be ready, but there were problems with sorting, I don’t see what the problem is here?
The main code and the getInfo() method, which should print the contents of the array to the console:
Here is the code for the sort itself. If you do not run the getInfo () method, then everything works well, but as soon as I call it after the sort method, an exception pops up.
Many thanks in advance for your help!
Answer the question
In order to leave comments, you need to log in
Well, they wrote you quite clearly - NullPointerException. And even the line number is given.
Put a breakpoint on this line and see
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question