This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Array  RSS feed

 
Joyce Yu
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I don't understand what's int[], char[].
It's a primitive type array and an object too? so all the object method can apply on it and so does all the Arrays method?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A primitive array is indeed an Object, so you can clone() it, get a hashCode() for it, etc. java.util.Arrays is a separate class; note that all its methods are static. They are handy when working with arrays, but they're not methods you can call on arrays directly.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!