aspose file tools*
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
Author

Array

Joyce Yu
Greenhorn

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
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

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]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Array