• Post Reply Bookmark Topic Watch Topic
  • New Topic

Array  RSS feed

 
Ranch Hand
Posts: 664
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the difference between Array Class and Arrays Class.

The whole time I was trying to sort using Array.sort() and then came to know it's Arrays.sort().

Can someone tell me which one is used when?
 
Java Cowboy
Sheriff
Posts: 16078
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at the API documentation.

The Array class is in package java.lang.reflect, so it has to do with reflection.

The Arrays class is a class with only static utility methods to help you work with arrays.
 
Nabila Mohammad
Ranch Hand
Posts: 664
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!