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 35 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
Great answer, keep it coming :)


pratush dev

  • Member
  • Posts: 321
Reply 3 on: Yesterday
Excellent

 

Did you know?

Earwax has antimicrobial properties that reduce the viability of bacteria and fungus in the human ear.

Did you know?

The liver is the only organ that has the ability to regenerate itself after certain types of damage. As much as 25% of the liver can be removed, and it will still regenerate back to its original shape and size. However, the liver cannot regenerate after severe damage caused by alcohol.

Did you know?

There used to be a metric calendar, as well as metric clocks. The metric calendar, or "French Republican Calendar" divided the year into 12 months, but each month was divided into three 10-day weeks. Each day had 10 decimal hours. Each hour had 100 decimal minutes. Due to lack of popularity, the metric clocks and calendars were ended in 1795, three years after they had been first marketed.

Did you know?

Children with strabismus (crossed eyes) can be treated. They are not able to outgrow this condition on their own, but with help, it can be more easily corrected at a younger age. It is important for infants to have eye examinations as early as possible in their development and then another at age 2 years.

Did you know?

A seasonal flu vaccine is the best way to reduce the chances you will get seasonal influenza and spread it to others.

For a complete list of videos, visit our video library