title: Randomly choosing elements from array without choosing an element twice
body: <p>I have 2 arrays that are shuffled in the same way. Basically I want to remove the array elements once it's been asked to avoid getting duplicates being printed out:</p>
  
  <p>How do I go about this, do I need to use an array list? I am completely lost.</p>
  
  <pre><code>/*
   * *** Random Test ***
   * Allows the user to generate a random test
   * from a bank of 10 questions.
   */
  
  // import java libraries
  import java.util.Scanner;
  import java.util.Random;
  
  public class randomTest {
  public static void main(String args[]) {
      Scanner sc = new Scanner (System.in);
  
  
      // Question bank
      String[] qBank = new String[] {"What is the capital of England?", 
              "Which animal comes first in the English dictionary",
              "How many days are there in a leap year?"};
  
      // Answer bank
      String[] aBank = new String[] {"London", 
              "Aardvark", 
              "366"};
  
      // How many questions?
      System.out.println("How many questions would you like? (1-10)");
      int numQuestions = Integer.parseInt(sc.nextLine());
      int asked = 0;
  
      // Already Asked
      int[] alreadyAsked = new int[numQuestions];
  
  
      while (numQuestions != asked) {
  
          // Random question
          int idx = new Random().nextInt(qBank.length);
          String question = (qBank[idx]);
          System.out.println(question);
  
  
          System.out.println("Enter your awnswer: ");
          String myAnswer = sc.nextLine();
          asked ++;
  
  
          if (myAnswer.equals(aBank[idx])) {
              System.out.println("Correct answer!");
          } else {
              System.out.println("Wrong answer");
          }
      }
      }
  }
  </code></pre>