Hmm... interesting. I thought that would get rid of the error, but doing some testing it seems that's not the case. Yes, it is a runtime check but I seem to remember there being some "code structure"...
Type: Posts; User: helloworld922
Hmm... interesting. I thought that would get rid of the error, but doing some testing it seems that's not the case. Yes, it is a runtime check but I seem to remember there being some "code structure"...
You can use instanceof to check the type.
if(o instanceof ArrayList<String>)
{
ArrayList<String> l = (ArrayList<String>) o;
}