English

State the difference between == operator and equals () method. - Computer Applications

Advertisements
Advertisements

Question

State the difference between == operator and equals () method. 

Distinguish Between

Solution

S. No. == operator equals ()
1. It is a relational operator. It is a method of string class.
2. It checks for equality of primitive type of values. It checks for equality of two string types of values.
shaalaa.com
Introduction of Operators in Java
  Is there an error in this question or solution?
Chapter 4: String Handling - Review Insight [Page 285]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 4 String Handling
Review Insight | Q 14. | Page 285
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×