I keep getting this error and I’m not sure how to resolve it, I have an ArrayList of object arrays, I can store the elements but I’m not sure how to get the elements back out, Is there anything here that’s obviously wrong?
ArrayList<Object[]> pA = processArray(statii);
for(Object pAs: pA){
Toast.makeText(TweetstagramActivity.this, pAs[0], //error occurs here
Toast.LENGTH_LONG).show();
This is the problem:
You want:
The first is legal because any
Object[]reference is also a validObjectreference – but then you can’t usepAs[0]as you’re trying to in the loop.(I’d also encourage you to use more descriptive variable names, btw.)