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
How destructors are defined in java?
Is there a way to increase the size of an array after its declaration?
What is stack class in java?
Can a list be null in java?
Difference between method overloading and method overriding in java ?
Explain the significance of class loaders in bootstrap?
What is a nonetype?
What are design patterns and please explain?
What is default locale java?
extending thread class or implementing runnable interface. Which is better? : Java thread
What are the two types of java programming?
Write a function for palindrome and factorial and explain?
Is java developer a good career?
What is a list in java?
Can we define package statement after import statement in java?