If s1 and s2 are references to two strings, then which of the following is the correct way to compare the two references?

Question:
If s1 and s2 are references to two strings, then which of the following is the correct way to compare the two references?

1.s1 is s2

2. s1 = s2

3.s1.Equals(s2)

4.strcmp(s1, s2)

Posted Date:-2022-06-25 06:30:20


More MCQS Questions and answers

Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!