Say, I have a method that returns a custom List with some objects. They are returned as Object to me. I need to get value of a certain field from t
There is one more way, i got the same situation in my project. i solved this way
List
In above hibernate query language i know at which place what are my objects so what i did is :
for(Object[] obj : list){
String val = String.valueOf(obj[1]);
int code =Integer.parseint(String.valueof(obj[0]));
}
this way you can get the mixed objects with ease, but you should know in advance at which place what value you are getting or you can just check by printing the values to know. sorry for the bad english I hope this help