Finding the two highest numbers based on input
<p>I'm tasked in completing a program where the user enters student names and their scores. In the end, the program should output the two students with the highest scores, however I'm only able to output the student with the highest score.</p>

<pre><code>public class StudentScores
{
public static void main(String[] args) 
{
    Scanner input = new Scanner(System.in);
    System.out.print("Enter the number of students: ");
    int numStudents = input.nextInt();
    System.out.print("Enter the student's name: ");
    String Student1 = input.next();
    System.out.print("Enter the student's score: ");
    int Score1 = input.nextInt();

    for (int i = 0; i &lt; numStudents - 1; i++) 
    {
        System.out.print("Enter the student's name: ");
        String Student = input.next();
        System.out.print("Enter the student's score: ");
        int Score = input.nextInt();

        if (Score &gt; Score1) 
        {
            Student1 = Student;
            Score1 = Score;
        }
    }
    System.out.println(Student1 + "'s score is " + Score1);
}}
</code></pre>

<p>The thing I'm unsure about is how to figure out how to get a Student2 and Score 2 in the mix based on user input. I'd like to use arrays but I must use loops so this is where I'm stumped. </p>
