explain the term- comparing stringsfor comparing


Explain the term- Comparing Strings

For comparing Strings never use == operator, use equals method of String class.

- == operator compares addresses (shallow comparison) while equals compares values (deep comparison)

For instance: string1.equals (string2)

 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: explain the term- comparing stringsfor comparing
Reference No:- TGS0356451

Expected delivery within 24 Hours