how to specify the genric type in runtime

Posted by santose on Stack Overflow See other posts from Stack Overflow or by santose
Published on 2010-05-12T06:25:12Z Indexed on 2010/05/12 6:34 UTC
Read the original article Hit count: 170

Filed under:

I'm having a arraylist which I need to specify the type in runtime.

ArrayList<String> alist = new ArrayList<String>();

I need to specify the type "String" at runtime. how can I do that. It should not be static.

© Stack Overflow or respective owner

Related posts about java