title: Print out an array in uppercase Java
body: <p>So for this program I'm currently creating I have had to store 10 names in an array, which is simple enough, then print out that array with the 10 names displayed in uppercase, which is the part I'm currently stuck on. I've been told that using a for or for each loop will be able to achieve this.</p>
  
  <p>This is the code I currently have: </p>
  
  <pre><code>package uploadTask8_uppercaseArrays;
  
  import java.util.Arrays;
  import java.util.Scanner;
  
  public class uppercaseArrays {
  
      public static void main(String[] args) {
          // creates array that will store the 10 names
          String[] names10 = new String[10];
  
          System.out.println("Please enter the ten names: \n1: ");
          // create scanner object to get user input
          Scanner userInput = new Scanner(System.in);
          String firstName = userInput.nextLine();
          System.out.println("2: ");
          String secondName = userInput.nextLine();
          System.out.println("3: ");
          String thirdName = userInput.nextLine();
          System.out.println("4: ");
          String fourthName = userInput.nextLine();
          System.out.println("5: ");
          String fifthName = userInput.nextLine();
          System.out.println("6: ");
          String sixthName = userInput.nextLine();
          System.out.println("7: ");
          String seventhName = userInput.nextLine();
          System.out.println("8: ");
          String eigthName = userInput.nextLine();
          System.out.println("9: ");
          String ninthName = userInput.nextLine();
          System.out.println("10: ");
          String tenthName = userInput.nextLine();
          userInput.close();
  
          // assigns user input to each element in the array
          names10[0] = firstName;
          names10[1] = secondName;
          names10[2] = thirdName;
          names10[3] = fourthName;
          names10[4] = fifthName;
          names10[5] = sixthName;
          names10[6] = seventhName;
          names10[7] = eigthName;
          names10[8] = ninthName;
          names10[9] = tenthName;
  
          // prints out the array in lowercase
          System.out.println(Arrays.toString(names10));
          // prints out the array in uppercase
  
  
  
      }
  
  }
  </code></pre>
  
  <p>I've had a look at some other code,  but can't actually work out the code for the for or for each loop that changes the array into uppercase. Does anyone know how this would work?</p>