title: Printing out 2d array elements in java
body: <p>I'm trying to print out elements in a 2d array, but can't seem to format it. Anytime I try to format it I get an error</p>
  
  <pre><code>    String [][] plants = new String[2][2];
      plants[0][0] = "Rose";
      plants[0][1] = "Red";
      plants[1][0] = "Snowdrop";
      plants[1][1] = "White";
  
      //String plant;
      //String color;
      for (int i = 0; i&lt;2; i++){
      for (int j = 0; j&lt;2; j++){
  
          //plant = Arrays.toString(plants[i]);
          //color = Arrays.deepToString(plants[j]);
          //System.out.println(plant + " " + color);
          System.out.println(plants[i][j]);
  
      }
      }
  </code></pre>
  
  <p>What I have so far prints out each element on an individual line, but I want it to print out like:</p>
  
  <p>Rose Red</p>
  
  <p>Snowdrop White</p>
  
  <p>I've tried the methods commented out, but they won't work right either.</p>
  
  <p>Any suggestions? Thanks</p>