Get variable value optionalObject []

0

I am making a select by taking the result as below:

Optional<Object[]> oLista = query2.getResultList().stream().findFirst();

oLista2.isPresent
{
    Integer ident = (Integer) oLista.get()[0];
}

You need to get the value but you are giving the following error

  

java.lang.Integer can not be cast to [Ljava.lang.Object;

    
asked by anonymous 29.05.2018 / 15:00

0 answers