A list of top Java String FAQs (Frequently Asked Questions) or interview questions are given below. These questions can be asked by the interviewer.
String s1="w3cschoool";
String s2="w3cschoool";
The equals() method matches content of the strings whereas == operator matches object or reference of the strings.