title: How can I convert ArrayList<Object> to ArrayList<String> or ArrayList<Timestamp>?
body: <p>Program ::</p>
  
  <pre><code>ArrayList&lt;Object&gt; DataList = new ArrayList&lt;Object&gt;();
  ArrayList&lt;BigDecimal&gt; valueList = new ArrayList&lt;BigDecimal&gt;();
  
  ArrayList&lt;String&gt; stringList = new ArrayList&lt;String&gt;();
  ArrayList&lt;Timestamp&gt; dateList = new ArrayList&lt;Timestamp&gt;();
  
  List&lt;ArrayList&lt;Object&gt;&gt; listDatas = getDetailsfromDB();
  // Here we get list like
  //  [[12,apple],[25, grape],[1,orange]] or
  //    [[12,12/12/2013],[25, 11/11/2013],[1,10/10/2013]]
  
  for( int i = 0; i &lt; listDatas.size(); i++)
  {
  List&lt;Object&gt; temp = listDatas.get(i);
        valueList.((BigDecimal) temp.get(0));
      if( temp.get(1) instanceof String)
            stringList.add((String)temp.get(1));
      else if( temp.get(1) instanceof Timestamp)
             dateList.add((Timestamp)temp.get(1));
   }
  </code></pre>
  
  <p>This is the program am tried out. 
  But i want to use the same list for both string and timestamp.<br>
  Is that possible or not ? If yes how ??</p>