title: How to iterate List of object array and set to another object list in java 8?
body: <p>Currently I have list of object array from that array i have to Iterate and add to the list of my <code>LatestNewsDTO</code> what i have done below code working but still i am not satisfy with my way . Is their any efficient way please let me know.</p>
  
  <p>Thanks</p>
  
  <pre><code>List&lt;Object[]&gt; latestNewses = latestNewsService.getTopNRecords(companyId, false, 3);
  List&lt;LatestNewsDTO&gt; latestNewsList = new ArrayList();
  latestNewses.forEach(objects -&gt; {
      LatestNewsDTO latestNews = new LatestNewsDTO();
      latestNews.setId(((BigInteger) objects[0]).intValue());
      latestNews.setCreatedOn((Date) objects[1]);
      latestNews.setHeadLine((String) objects[2]);
      latestNews.setContent(((Object) objects[3]).toString());
      latestNews.setType((String) objects[4]);
      latestNewsList.add(latestNews); 
  });
  </code></pre>