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
Can long be null in java?
What are the 4 types of research methods?
What are the differences between forwarding () method and sendredirect() methods?
What is java oops?
Difference between default and protected access specifiers?
Why call by value prevents parameter value change?
List some java keywords sun like c, c + + keywords?
Can I extend singleton class in java?
What is pass by value?
Explain the available thread states in a high-level?
When to use runnable interface vs thread class in java?
Difference between object and reference?
How can we break singleton in java?
Does apple use java?
What is double in java?