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 are the java ide's? Explain

1035


Which methods are used during serialization and deserialization process?

985


What are the differences between forwarding () method and sendredirect() methods?

1104


What are identifiers in java?

1117


What is computer compiler?

995


What are the steps involved to create a bean?

1152


What is the difference between jdk and jre?

1057


What is the abstraction?

1015


What are the advantages of arraylist over arrays?

1088


What is default constructors?

995


Explain what are final variable in java?

1060


Explain the difference between jvm and jre?

1034


What is the difference between C++ and Java and your preferences?

1109


How does regex work?

956


Explain about procedural programming language or structured programming language and its features?

1094