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...

What method is used to compare two strings ?

Answer Posted / interviewall

If string a="aaaa"; and String b="bbbb";
we can compare them as
if(a.equals(b)) and get a boolean as a return type.

////////////////////////////////////////////////////////

We can also compare String as
a.compareTo("aaaa"); which gives 0 as output as they are
equal.

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can long be null in java?

1007


What are the 4 types of research methods?

920


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

1104


What is java oops?

1066


Difference between default and protected access specifiers?

1117


Why call by value prevents parameter value change?

1072


List some java keywords sun like c, c + + keywords?

998


Can I extend singleton class in java?

1097


What is pass by value?

943


Explain the available thread states in a high-level?

959


When to use runnable interface vs thread class in java?

971


Difference between object and reference?

1171


How can we break singleton in java?

966


Does apple use java?

940


What is double in java?

978