• Post Reply Bookmark Topic Watch Topic
  • New Topic

collections vs arrays?

 
pras
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
under what scenario we should use a array and in what scenarion we should use a collection?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 15715
73
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An example: Arrays are not resizeable at runtime. So if you need a collection of objects that doesn't have a fixed size, you'll need to use a collection class.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!