title: "Exception in thread "main" java.lang.NullPointerException" ArrayList
body: <p>People, I need your help with this issue because I cannot find the proper solution to solve it.</p>
  
  <p>the issue is:</p>
  
  <pre><code>**Exception in thread "main" java.lang.NullPointerException
      at edu.maimonides.www.progmul3.tps.tp1.Garage.park(Garage.java:57)
      at edu.maimonides.www.progmul3.tps.tp1.GarageElPlus.main(Garage.java:29)
  Java Result: 1**
  </code></pre>
  
  <p>// Translation: Auto = Car - Moto = Motorcicle - Camioneta = Van</p>
  
  <pre><code>**Class Park Slot**
  
  public class Park Slot {
  
  
    private ArrayList&lt;Integer&gt; bigParkSlot =  
         new ArrayList&lt;&gt;(Arrays.asList(1, 3, 5, 7, 9, 11));
     private ArrayList&lt;Integer&gt; avaliableParkSlot =  
         new ArrayList&lt;&gt;(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 
                11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22));
     private Map&lt;Integer, String&gt; busyParkSlot = new HashMap&lt;&gt;();
     private ArrayList uncoveredParkSlot =  
         new ArrayList&lt;&gt;(Arrays.asList(11, 12, 13, 14, 15, 16, 17, 18, 19, 20));
     private ArrayList coveredParkSlot = 
         new ArrayList&lt;&gt;(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
  
     }
  
     **Class Garage**  
  
      // Line 57
      // the problem is here
  
     ArrayList&lt;Integer&gt; pElem = c.getavaliableParkSlot();
  
     int num = pElem.iterator().next();
  </code></pre>