title: Java - Trying to print an index in a String Array Using get method
body: <p>So i have a String array    </p>
  
  <pre><code>private  String[] transmission = {"Drive", "Park", "Reverse"};
  </code></pre>
  
  <p>Here is my set method, I'm practicing my switch statement as I don't use it often.</p>
  
  <pre><code>public void setTransmission(String[] transmission) {
      System.out.println("To change the transmission, enter D for Drive,P for Park or R for reverse");
      switch (input.nextLine()) {
          case "D":
          case "d":
              System.out.println("The Car is currently in Drive.");
              transmission[0] = this.transmission[0];
              break;
          case "P":
          case "p":
              System.out.println("The Car is currently in Park.");
              transmission[1] = this.transmission[1];
              break;
          case "R":
          case "r":
              System.out.println("The Car is currently in Reverse");
              transmission[2] = this.transmission[2];
              break;
  
      } 
  </code></pre>
  
  <p>Here is the real PROBLEM. In my getMethod it only prints the first index in the array:</p>
  
  <pre><code> public String getTransmission()
      {
          return String.format("The car is currently in %s",transmission);
      }
  </code></pre>
  
  <p>How can i get it to print what the user entered? I know i could just use a string variable but i would prefer to use an array.</p>