title: Java Convert List<String> to List<Object>
body: <p>I've two classess CsvRead and MyOwnClass. </p>
  
  <p>In CsvRead I've a method public static List getDataFromCsv(); It returns list of all data. And this data I want to take in another method in class MyOwnClass and return there as list of objects of My OwnClass </p>
  
  <p>It looks like this:</p>
  
  <pre><code>List&lt;String&gt; dataFromCsv = new ArrayList&lt;String&gt;();
  </code></pre>
  
  <p>And in another class, I want to convert it to <code>List&lt;Object&gt;</code> of my class.</p>
  
  <pre><code>private static List&lt;String&gt; getDataFromCsvClass = new ArrayList&lt;String&gt;();
  getDataFromCsvClass = CsvReader.getAllCsvData(filename);
  String name = dataFromCsv[0];
  String surname = dataFromCsv[1];
  String birth = dataFromCsv[2];
  </code></pre>
  
  <p>I want to return <code>new MyOwnClass(name, surname, birth);</code></p>
  
  <p>MY ERROR: array required but List found: String name = allData[0]; etc</p>