title: Return element at position index. (No ArrayList)
body: <p>format: get(index):Object.</p>
  
  <pre><code>public class MyArrayList {
      public String[] arrays = {};
  
  
      public MyArrayList() {
          arrays = new String[10];
      }
  
      public int get(int i){
          for(int index = 0; index&lt; arrays.length; index++) {
  
          }
          return i;
      }
  }
  
  public class MyArrayListTest {
  
      static MyArrayList zoo = new MyArrayList();
  
  
      public static void printZoo() {
          System.out.print("The zoo now holds " + zoo.size() + " animals: ");
          for (int j = 0; j &lt; zoo.size(); j++) System.out.print(zoo.get(j) + " ");
          System.out.println();
      }
  
      public static void main(String[] args) {
  
          System.out.println("Testing constructor, add(object) and size() ");
          zoo.add("Ant");
          zoo.add("Bison");
          zoo.add("Camel");
          zoo.add("Dog");
          zoo.add("Elephant");
          zoo.add("Frog");
          zoo.add("Giraffe");
          zoo.add("Horse");
          printZoo();
          System.out.println();
      }
  }
  </code></pre>
  
  <p>With this code it prints out:</p>
  
  <p>Testing constructor, add(object) and size() 
  The zoo now holds 10 animals: 0 1 2 3 4 5 6 7 8 9 </p>
  
  <p>Obviously my code for get method is very wrong but instead of printing out the numbers it should print out "Ant","Bison,"Camel" etc.</p>
  
  <p>All help appreciated for code as I'm a very new programmer. Thanks.</p>