I'm having difficulty processing an array of numbers from a class file (Scores.java) within a separate class file (ProcessScores.java).
Adding Scores.main(); within the main void of ProcessScores.java does print the array but my attempts to work with the output have failed. For instance, int[] numbers = Scores.main(); throws the error "Incompatible Types. Required: int[], Found: void". I understand that I'm calling the main void from the Scores class so my question is...
How can I get the output from the Scores class into the ProcessScores class in a way that I can work with it?
int[] getNumbers()forScores, that would return the array of numbers stored in theScoresclass. Then you can doint[] numbers = Scores.getNumbers()inside of yourProcessScoresmain method.