Meaningless Drivel is fun!
The moose likes Java in General and the fly likes Primitive collections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Primitive collections" Watch "Primitive collections" New topic

Primitive collections

Chinmay Bajikar
Ranch Hand

Joined: Dec 08, 2001
Posts: 159
Hi all,
Is there any way for me in Java 1.4 to have a collection(a vector preferably) of primitive elements like int,float instead of Integer,Float(wrapper classes).
Also is there any significant difference between as 'int'(primitive) and an 'Integer'(Object) in terms of mem consumption or speed or storage space.
[ January 15, 2003: Message edited by: Chinmay Bajikar ]

The strength of the Wolf is the pack & the strength of the pack is the wolf....Rudyard Kipling
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1141

I don't know if this helps you, but I did a search at "" for "java primitive collection", and found the following:
Hope it helps you.
Good Luck,
Chinmay Bajikar
Ranch Hand

Joined: Dec 08, 2001
Posts: 159
Hey Avi,
Thanks for those links.
Right now I will be looking at those.
will let u know if those help me.
I agree. Here's the link:
subject: Primitive collections
It's not a secret anymore!