whats the difference between == and .equal ?
Answer Posted / nagaraju
== it is relational operator to copares the values
.equals() is a method to compares the two strings whether
they are equal or not.
if(a==b)
System.out.println("both are equal");
object.equals(string1,string2)
System.out.println("strings are same");
| Is This Answer Correct ? | 24 Yes | 6 No |
Post New Answer View All Answers
What are the java ide's? Explain
Which methods are used during serialization and deserialization process?
What are the differences between forwarding () method and sendredirect() methods?
What are identifiers in java?
What is computer compiler?
What are the steps involved to create a bean?
What is the difference between jdk and jre?
What is the abstraction?
What are the advantages of arraylist over arrays?
What is default constructors?
Explain what are final variable in java?
Explain the difference between jvm and jre?
What is the difference between C++ and Java and your preferences?
How does regex work?
Explain about procedural programming language or structured programming language and its features?