This topic contains a solution. Click here to go to the answer

Author Question: Suppose s1 and s2 are two strings. What is the result of the following code? s1.equals(s2) == s2.equals(s1) (Read 30 times)

jenna1

  • Hero Member
  • *****
  • Posts: 568

Question 1

Suppose s1 and s2 are two strings. Which of the following statements or expressions is incorrect?
◦ boolean b = s1.compareTo(s2);
◦ String s3 = s1 - s2;
◦ char c = s1[0];
◦ char c = s1.charAt(s1.length());

Question 2

Suppose s1 and s2 are two strings. What is the result of the following code?

 s1.equals(s2) == s2.equals(s1)

◦ true
◦ false


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by jenna1 on May 6, 2020

huda

  • Sr. Member
  • ****
  • Posts: 304
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 50% of students answer this correctly




jenna1

  • Member
  • Posts: 568
Reply 2 on: May 6, 2020
Thanks for the timely response, appreciate it


debra928

  • Member
  • Posts: 342
Reply 3 on: Yesterday
:D TYSM

 

Did you know?

The people with the highest levels of LDL are Mexican American males and non-Hispanic black females.

Did you know?

Blood is approximately twice as thick as water because of the cells and other components found in it.

Did you know?

Pubic lice (crabs) are usually spread through sexual contact. You cannot catch them by using a public toilet.

Did you know?

Vaccines prevent between 2.5 and 4 million deaths every year.

Did you know?

Although the Roman numeral for the number 4 has always been taught to have been "IV," according to historians, the ancient Romans probably used "IIII" most of the time. This is partially backed up by the fact that early grandfather clocks displayed IIII for the number 4 instead of IV. Early clockmakers apparently thought that the IIII balanced out the VIII (used for the number 8) on the clock face and that it just looked better.

For a complete list of videos, visit our video library