title: How to store a List with own data type in an object array list
body: <p>I have an List listObject and i want to store a List pointListForObject  for every object of listObject.
  How can i make it work?</p>
  
  <pre><code>class Points {
      private int start;
      private int stop;
  
      public Points() {
          start = 0;
          stop = 0;
      }
  
      setter and getter... 
   }
  
   List&lt;Object[]&gt; listObject = new ArrayList&lt;Object[]&gt;;
   List&lt;Points&gt; pointListForObject = new ArrayList&lt;Points&gt;;
      ...
      Points point= new Point();
      point.setStart(1);
      point.setStop(2);
  
      pointListForObject.add(point);
      listObject.get(0)[1] = pointListForObject;
  </code></pre>
  
  <p>And now i want to get the points in another method back, but i don't know how to cast or convert in the right way.
  My idea is:</p>
  
  <pre><code>List&lt;Points&gt; usePointsOfObject = (List&lt;Points&gt;) listObject.get(0)[1];
  </code></pre>
  
  <p>And here I get an:
  Exception in thread <code>"main" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.util.List</code></p>
  
  <p>I tried different possibilities(to cast or convert) that i know but it doesn't work
  I have no ideas..</p>