Search:

Type: Posts; User: helloworld922

Search: Search took 0.10 seconds; generated 36 minute(s) ago.

  1. Replies
    4
    Views
    1,040

    Re: Casting Confusion

    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"...
  2. Replies
    4
    Views
    1,040

    Re: Casting Confusion

    You can use instanceof to check the type.



    if(o instanceof ArrayList<String>)
    {
    ArrayList<String> l = (ArrayList<String>) o;
    }
Results 1 to 2 of 2