title: How to get List<String> from List<Object[]> by converting first element of array to String
body: <p>How to get <code>List&lt;String&gt;</code> from <code>List&lt;Object[]&gt;</code> by converting the first element of array to String?</p>
  
  <p>I tried writing like below but casting is not happening,</p>
  
  <pre><code>List&lt;String&gt; results = query.getResultList()
  .stream()
  .map(result -&gt;{
   Object[]  temp =  (Object[]) result;
   return temp[0].toString();
  })
  .collect(Collectors.toList());
  </code></pre>
  
  <p>Below image shows type of results list 
  <a href="https://i.stack.imgur.com/CV8A3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CV8A3.jpg" alt="enter image description here"></a>
  I am getting Error:java: incompatible types: java.lang.Object cannot be converted to java.util.List.
  How to do this correctly using Java 8?</p>