Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Array and java.util.Arrays

 
Sanjay Saxena
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the difference between these?
What contexts are they used in ?
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is from the API for java.util.Arrays :
This class contains various methods for manipulating arrays (such as sorting and searching). This class also contains a static factory that allows arrays to be viewed as lists.
This chapter of
Thinking in Java is what you need.
 
Sanjay Saxena
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jose. It helps but still I'm not clear why we needed two classes.
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is from java.lang.Array :
The Array class provides static methods to dynamically create and access Java arrays.
This class is not very used by the programmer. while java.util.Arrays provide useful algorithms to apply to array objects
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic