Check out example codes for "string equality in java". It will help you in understanding the concepts better.

Code Example 1

String str = "abc";
String str1 = "abc";
System.out.println(str.equals(str1));
// returns true if str and str1 are exactly same otherwise false

Learn ReactJs, React Native from akashmittal.com