title: how to fix java.lang.IndexOutOfBoundsException
body: <blockquote>
    <p>Exception in thread "main" java.lang.IndexOutOfBoundsException: Index:
    0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:604)</p>
  </blockquote>
  
  <p>in line of arraylist.java</p>
  
  <pre><code>private void rangeCheck(int index) {
      if (index &gt;= size)
          throw new IndexOutOfBoundsException(outOfBoundsMsg(index));
  }
  </code></pre>
  
  <p>in line </p>
  
  <pre><code>List lstpp = getResult(pp) ;
      System.out.println("=====Persegi Panjang====");
      System.out.println("luas = "+((Integer)lstpp.get(0)));
  </code></pre>
  
  <p>Please help</p>