title: Using arrays to generate a players score
body: <p>I'm trying to use the array method to keep track of scores on my game, I'm having difficulty in doing so when I try to compile and run.</p>
  
  <pre><code>import java.util.Scanner;
  import java.io.*;
  
  public class score
  {
  
      public static void main (String[]args)
      {
  
      Scanner scan = new Scanner(System.in);
  
      int [] arrPlayer = new int[7];
  
      System.out.println("Please Enter Your Score");
      arrPlayer[0]=scan.nextInt();
      System.out.println("Please Enter Your Score");
      arrPlayer[1]=scan.nextInt();
      System.out.println("Please Enter Your Score");
      arrPlayer[2]=scan.nextInt();
      System.out.println("Please Enter Your Score");
      arrPlayer[3]=scan.nextInt();
      System.out.println("Please Enter Your Score");
      arrPlayer[4]=scan.nextInt();
      System.out.println("Please Enter Your Score");
      arrPlayer[5]=scan.nextInt();
      System.out.println("Please Enter Your Score");
      arrPlayer[6]=scan.nextInt();
  
      System.out.println("Player 1 : Score: "arrPlayer[0];
      System.out.println("Player 1 : Score: "arrPlayer[1];
      System.out.println("Player 1 : Score: "arrPlayer[2];
      System.out.println("Player 1 : Score: "arrPlayer[3];
      System.out.println("Player 1 : Score: "arrPlayer[4];
      System.out.println("Player 1 : Score: "arrPlayer[5];
      System.out.println("Player 1 : Score: "arrPlayer[6];
  
      for(int i=0;i&lt;7;i++);
  
      }
  
  }
  </code></pre>