It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Java Forum

Arrays.equal method?

Arrays.equal method?

Postby aaljallaf on Mon Dec 04, 2006 7:36 pm

I was told that i could compare arrays by using the 'Arrays.equal' method.

Could someone enlighten me on how to use this method, and other possible methods I could use as well.

Thank you very much.
aaljallaf
 
Posts: 2
Joined: Mon Dec 04, 2006 7:30 pm

Postby all_things_end on Tue Dec 05, 2006 3:08 am

Im having trouble with this as well....does anyone know?
all_things_end
 
Posts: 0
Joined: Tue Dec 05, 2006 3:05 am

Postby meongmania on Tue Dec 19, 2006 4:32 am

trouble with what? the syntax for using equal is :

anArray.equals(someArray); returns boolean

and if you're looking to compare the values inside of an array using this method, it's impossible, because even if you have two identical array (e.g 2 array with the same type, and values, and array size) doesn't mean that the 2 array have the same key-value. Note that the array.equals() method returns true if and only if it refers to the same object.
meongmania
 
Posts: 16
Joined: Tue Dec 19, 2006 2:58 am


Who is online

Users browsing this forum: No registered users and 2 guests