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="javatpoint";
String s2="javatpoint";
The equals() method matches content of the strings whereas == operator matches object or reference of the strings.