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

Author Question: What is the print out of the following code?String s = "Welcome to Java";s.replaceAll("a", ... (Read 46 times)

stevenposner

  • Hero Member
  • *****
  • Posts: 608

Question 1

What is the printout of the following code?

String s1 = "Welcome to Java";
String s2 = "Welcome to Java";
System.out.println("s1 == s2 is " + s1 == s2);

◦ true
◦ false
◦ s1 == s2 is true
◦ s1 == s2 is false

Question 2

What is the print out of the following code?

String s = "Welcome to Java";
s.replaceAll("a", "BB");
System.out.println(s);

◦ Welcome to JBBvBB
◦ Welcome to JBBva
◦ Welcome to Java
◦ Welcome to JavBB


Related Topics

Need homework help now?

Ask unlimited questions for free

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

jamesnevil303

  • Sr. Member
  • ****
  • Posts: 337
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 39% of students answer this correctly




stevenposner

  • Member
  • Posts: 608
Reply 2 on: May 6, 2020
YES! Correct, THANKS for helping me on my review


bassamabas

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

 

Did you know?

A serious new warning has been established for pregnant women against taking ACE inhibitors during pregnancy. In the study, the risk of major birth defects in children whose mothers took ACE inhibitors during the first trimester was nearly three times higher than in children whose mothers didn't take ACE inhibitors. Physicians can prescribe alternative medications for pregnant women who have symptoms of high blood pressure.

Did you know?

Everyone has one nostril that is larger than the other.

Did you know?

A good example of polar molecules can be understood when trying to make a cake. If water and oil are required, they will not mix together. If you put them into a measuring cup, the oil will rise to the top while the water remains on the bottom.

Did you know?

Patients should never assume they are being given the appropriate drugs. They should make sure they know which drugs are being prescribed, and always double-check that the drugs received match the prescription.

Did you know?

Illicit drug use costs the United States approximately $181 billion every year.

For a complete list of videos, visit our video library