title: using a method to print an array in java
body: <p>From my current code how would i print the array{10,20,30,40,50,60,70,88,99,100} using a method display and calling it using System.out.println(myobject.display()) in my main.</p>
  
  <pre><code>public TestA(){
      index = -1;
      iA = new int[]{10,20,30,40,50,60,70,88,99,100};
  }
  
  public static String display(){
      String str = "";    
      for(int i = 0; i &lt; 10; i++){
          str= str+ " ";
      }//for
      return str;
  }//display
  </code></pre>
  
  <p>My current method display does not display anything.</p>