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
Name four container classes.
Difference between this() and super() ?
Can you call a method on a null object?
What is void in java?
Is array serializable java?
What is diamond operator in java?
Why do we need data structure in java?
What is ellipsis in java?
What is lazy programming?
What is the difference between JVM and JRE?
What are the 2 types of java programs?
Explain why wait(), notify() and notifyall() methods are in object class rather than in the reading class?
What do you mean by inner class in java?
What is a function in programming?
What is the benefit of using enum to declare a constant?