This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Array and java.util.Arrays Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Array and java.util.Arrays" Watch "Array and java.util.Arrays" New topic
Author

Array and java.util.Arrays

Sanjay Saxena
Ranch Hand

Joined: Dec 12, 2001
Posts: 81
What's the difference between these?
What contexts are they used in ?
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
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.


SCJP2. Please Indent your code using UBB Code
Sanjay Saxena
Ranch Hand

Joined: Dec 12, 2001
Posts: 81
Thanks Jose. It helps but still I'm not clear why we needed two classes.
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Array and java.util.Arrays