what is the difference between equals method and ==

Answer Posted / sriragv

equal method also indirectly use == method i.e hashcode
(),there will be no difference b/w equals and == unless
until u override the equal method

Let me know if iam wrong

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is fastest collection in java?

566


What is lastindexof in java?

550


What are the classes of java?

543


Can we split string with in java?

534


What is a subsequence of a string?

549






What are the default and parameterized constructors?

557


What are the ways in which a thread can enter the waiting state?

515


What is memory leak and how does java handle it?

525


What is rmi and steps involved in developing an rmi object?

570


What is a nested structure?

539


How to display all the prime numbers between 1 and n (n is the number, get the input from user)

515


Are functions objects in java?

544


Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)

857


Difference between a class and an object?

582


How do you join strings in java?

528