title: Creating an Array List from scratch
body: <p>I was wondering if anyone would be able to point me in the correct direction in regards to creating my own array list methods. For instance, the current project I am assigned to does not allow for me to use the methods given to me for free like in the following example. </p>
  
  <pre><code>    package com.tutorialspoint;
  
  import java.util.ArrayList;
  
  public class ArrayListDemo {
     public static void main(String[] args) {
  
     // create an empty array list with an initial capacity
     ArrayList&lt;Integer&gt; arrlist = new ArrayList&lt;Integer&gt;(5);
  
     // use add() method to add elements in the list
     arrlist.add(15);
     arrlist.add(22);
     arrlist.add(30);
     arrlist.add(40);
  
     // adding element 25 at third position
     arrlist.add(2,25);
  
     // let us print all the elements available in list
     for (Integer number : arrlist) {
     System.out.println("Number = " + number);
     }  
     }
  }   
  </code></pre>
  
  <p>This example shows the add() method. For my project I have to create this method myself and call it from a different file within my package. </p>