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

Author Question: What is displayed by the following code? public static void main(String[] args) {String[] tokens = ... (Read 25 times)

HudsonKB16

  • Hero Member
  • *****
  • Posts: 535

Question 1

What is displayed by the following statement?

 System.out.println("Java is neat".replaceAll("is", "AAA"));

◦ Java AAAneat
◦ Java AAA neat
◦ JavaAAAneat
◦ JavaAAA neat

Question 2

What is displayed by the following code?

public static void main(String[] args) {
String[] tokens = "Welcome to Java".split("o");
for (int i = 0; i < tokens.length; i++) {
System.out.print(tokens[i] + " ");
}
}

◦ Welc me to Java
◦ Welcome t Java
◦ Welc me t Java
◦ Welcome to Java


Related Topics

Need homework help now?

Ask unlimited questions for free

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

DylanD1323

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




HudsonKB16

  • Member
  • Posts: 535
Reply 2 on: May 6, 2020
:D TYSM


emsimon14

  • Member
  • Posts: 344
Reply 3 on: Yesterday
Great answer, keep it coming :)

 

Did you know?

Not getting enough sleep can greatly weaken the immune system. Lack of sleep makes you more likely to catch a cold, or more difficult to fight off an infection.

Did you know?

Aspirin may benefit 11 different cancers, including those of the colon, pancreas, lungs, prostate, breasts, and leukemia.

Did you know?

The most destructive flu epidemic of all times in recorded history occurred in 1918, with approximately 20 million deaths worldwide.

Did you know?

Over time, chronic hepatitis B virus and hepatitis C virus infections can progress to advanced liver disease, liver failure, and hepatocellular carcinoma. Unlike other forms, more than 80% of hepatitis C infections become chronic and lead to liver disease. When combined with hepatitis B, hepatitis C now accounts for 75% percent of all cases of liver disease around the world. Liver failure caused by hepatitis C is now leading cause of liver transplants in the United States.

Did you know?

More than 20 million Americans cite use of marijuana within the past 30 days, according to the National Survey on Drug Use and Health (NSDUH). More than 8 million admit to using it almost every day.

For a complete list of videos, visit our video library