whats the difference between == and .equal ?
Answer Posted / deepak sharma
== compares the object refrences to see if they refer to the
same object in memory.
where as
.equals compares the content of object to see if the object
content is same. Most of the times it is used to compare the
String Object. It can be used to compare other Objects too.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Hi.... I applied for the post of scientific officer/Engineer-SB(Programmer).Please post the syllabus and sample papers.
Can singleton class be inherited in java?
What are static initalizers in java ?
What is mnemonic code?
Explain the differences between abstraction and encapsulation?
How would you format a date in java? I.e. In the ddmmyyy format?
What is a stringbuffer?
What do you mean by stack?
Is space a char?
Is vector ordered in java?
what is meant by encapsulation?
Differentiate between postfix and prefix operators in java.
What is meant by object?
How arrays are stored in memory in java?
Explain about fail safe iterators in java?