java: how can I create a dynamic array without forcing the type of the values?

Posted by ufk on Stack Overflow See other posts from Stack Overflow or by ufk
Published on 2010-04-09T13:58:29Z Indexed on 2010/04/09 14:03 UTC
Read the original article Hit count: 276

Filed under:
|

Hiya. I need to create a dynamic array in Java, but the values type differ from String to Int to float. how can I create a dynamic list that I don't need to give it in advanced the type of the values?

The keys just need to be ascending numbers (1,2,3,4 or 0,1,2,3,4)

I checked ArrayList but it seems that I have to give it a fixed type for the values.

thanks!

© Stack Overflow or respective owner

Related posts about java

Related posts about arrays