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

What do you mean by pointer value and address?

999


Can you extend main method in java?

1094


What is jvm? Why is java called the platform independent programming language?

946


What is meant by flickering?

1029


What is singleton class and how can we make a class singleton?

1057


What is nested top-level class?

983


Objects or references which of them gets garbage collected?

915


What is the difference between static class and normal class?

980


How do you use compareto?

887


How do you calculate roots in java?

1012


What is JDBC Driver interface?How can you retrieve data from the ResultSet

2046


What is an array in java?

1126


What is the different types of functions?

990


What restrictions are placed on method overloading?

1118


What are the different types of inner classes?

967