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

Author Question: What is displayed by the following code? System.out.print("A,B;C".replaceAll(",;", "#") + " "); ... (Read 16 times)

colton

  • Hero Member
  • *****
  • Posts: 627

Question 1

What is displayed by the following code?

System.out.print("Hi, ABC, good".matches("ABC ") + " ");
System.out.println("Hi, ABC, good".matches(".*ABC.*"));

◦ true true
◦ true false
◦ false false
◦ false true

Question 2

What is displayed by the following code?

System.out.print("A,B;C".replaceAll(",;", "#") + " ");
System.out.println("A,B;C".replaceAll("[,;]", "#"));

◦ A#B#C A#B#C
◦ A B C A B C
◦ A,B;C A#B#C
◦ A B C A#B#C


Related Topics

Need homework help now?

Ask unlimited questions for free

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

jaykayy05

  • Sr. Member
  • ****
  • Posts: 329
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




colton

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


DylanD1323

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

 

Did you know?

As many as 20% of Americans have been infected by the fungus known as Histoplasmosis. While most people are asymptomatic or only have slight symptoms, infection can progress to a rapid and potentially fatal superinfection.

Did you know?

Cutaneous mucormycosis is a rare fungal infection that has been fatal in at least 29% of cases, and in as many as 83% of cases, depending on the patient's health prior to infection. It has occurred often after natural disasters such as tornados, and early treatment is essential.

Did you know?

Children of people with alcoholism are more inclined to drink alcohol or use hard drugs. In fact, they are 400 times more likely to use hard drugs than those who do not have a family history of alcohol addiction.

Did you know?

There are 20 feet of blood vessels in each square inch of human skin.

Did you know?

Cocaine was isolated in 1860 and first used as a local anesthetic in 1884. Its first clinical use was by Sigmund Freud to wean a patient from morphine addiction. The fictional character Sherlock Holmes was supposed to be addicted to cocaine by injection.

For a complete list of videos, visit our video library