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
Name four container classes.
What is difference between fileinputstream and filereader in java?
How does thread synchronization occurs inside a monitor? What levels of synchronization can you apply?
Explain the difference between protected and default access.
what is recursion in java
What is the public method modifier?
What is meant by attribute?
Is a case study a method or methodology?
Define an abstract class with reference to java.
What are the advantages of assembly language?
Why do we declare a class static?
What is the default value of local and global variables?
What is annotation in java?
Can each java object keep track of all the threads that want to exclusively access it?
Explain the difference between runnable and callable interface in java?