I have created an ArrayList of Object and it contains both Integer and String.
List<Object> arrayList = new ArrayList<>();
Using the below condition I have checked whether it is integer or not
if(arrayList.get(indexValue) instanceof Integer){
// Here how convert the object into integer
}
But the problem is, how can I convert the object into integer ?
Thanks
Integer i = Integer.valueOf(someObject);docs.oracle.com/javase/6/docs/api/java/lang/…