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 35 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
YES! Correct, THANKS for helping me on my review


patma1981

  • Member
  • Posts: 292
Reply 3 on: Yesterday
Thanks for the timely response, appreciate it

 

Did you know?

Individuals are never “cured” of addictions. Instead, they learn how to manage their disease to lead healthy, balanced lives.

Did you know?

Between 1999 and 2012, American adults with high total cholesterol decreased from 18.3% to 12.9%

Did you know?

The horizontal fraction bar was introduced by the Arabs.

Did you know?

Fungal nail infections account for up to 30% of all skin infections. They affect 5% of the general population—mostly people over the age of 70.

Did you know?

According to the FDA, adverse drug events harmed or killed approximately 1,200,000 people in the United States in the year 2015.

For a complete list of videos, visit our video library