File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Array" Watch "Array" New topic


Joyce Yu

Joined: Jul 20, 2003
Posts: 6
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

Joined: Jul 08, 2003
Posts: 24199

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.

[Jess in Action][AskingGoodQuestions]
Don't get me started about those stupid light bulbs.
subject: Array
It's not a secret anymore!