Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Programmer Certification (OCPJP)
Arrays.equals() method
rohan yadav
Ranch Hand
Posts: 156
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Can anyone explain me Arrays.equals method??
Does it is overriden from Object class??
int[]a = new int[]{1}; int[]b = new int[]{1}; System.out.println(Arrays.equals(a,b));
And why the output of above program is true(As we are creating two array using new keyword)??
Sage of The Monstrous Toad of Mount Myoboku
Neha Daga
Ranch Hand
Posts: 504
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I think equals method checks if objects are meaningfully equal, it does not checks if the variables are referring to the same objects '==' does that.
and yes it is overridden.
read
,%20int[]%29]this
SCJP 1.6 96%
rohan yadav
Ranch Hand
Posts: 156
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks Neha, Got it now
Sage of The Monstrous Toad of Mount Myoboku
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Mock test question from Inquisition John Meyer's test
Check an array for equality
equals() doubt
equals in the case of arrays
arrays equals() confusion
More...