Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

whats the difference between == and .equal ?

Answer Posted / nagaraju

== it is relational operator to copares the values
.equals() is a method to compares the two strings whether
they are equal or not.

if(a==b)
System.out.println("both are equal");


object.equals(string1,string2)
System.out.println("strings are same");

Is This Answer Correct ?    24 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can java list be null?

1033


What is unicode used for?

1236


List the interfaces which extends collection interface?

996


How do you read a char in java?

1088


What are the types of java?

1169


How long will it take to learn java?

1032


Why is java multithreaded?

1039


What is java objectoutputstream?

1026


What is java abstraction with example?

1130


Implement a stack with push (), pop() and min() in O(1) time.

1159


How does the java compiler work?

1031


Can we extend singleton class in java?

1012


why are wait(), notify() and notifyall() methods defined in the object class? : Java thread

1045


Is char a method in java?

1122


What is stringwriter?

1018