Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ArrayList / Vector

 
Vishal K Patel
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We know that ArrayList and Vector both are growable array of Objects.
but can we store primitive datatypes in it?
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you cannot store them directly. However, you can add a primitive easily since 1.5 because they can be autoboxed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic