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

How destructors are defined in java?

1243


Is there a way to increase the size of an array after its declaration?

1088


What is stack class in java?

1097


Can a list be null in java?

1107


Difference between method overloading and method overriding in java ?

1140


Explain the significance of class loaders in bootstrap?

1015


What is a nonetype?

1175


What are design patterns and please explain?

1137


What is default locale java?

1181


extending thread class or implementing runnable interface. Which is better? : Java thread

1046


What are the two types of java programming?

1112


Write a function for palindrome and factorial and explain?

1139


Is java developer a good career?

1085


What is a list in java?

996


Can we define package statement after import statement in java?

1105