Retrieve data from Object[]?

Asked

Viewed 133 times

0

In the Debugger I saw that the object receives ['product', 210]

Object obj = prodRepositorio.somaById();

I’d like to get the data on it but it doesn’t work cast or anything.

I’ve tried to

String produto = (String)obj[0];
Long valor = (Long)obj[1];

I already changed it to Object[] but it is in obj[0]

  • Can you post the 'somaById()' code? Only with this information I can’t help you

  • somaById() returns a Map<String,int>, right?

  • not it returns an Object[]

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.