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 31 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
Wow, this really help


tandmlomax84

  • Member
  • Posts: 323
Reply 3 on: Yesterday
:D TYSM

 

Did you know?

Signs of depression include feeling sad most of the time for 2 weeks or longer; loss of interest in things normally enjoyed; lack of energy; sleep and appetite disturbances; weight changes; feelings of hopelessness, helplessness, or worthlessness; an inability to make decisions; and thoughts of death and suicide.

Did you know?

Dogs have been used in studies to detect various cancers in human subjects. They have been trained to sniff breath samples from humans that were collected by having them breathe into special tubes. These people included 55 lung cancer patients, 31 breast cancer patients, and 83 cancer-free patients. The dogs detected 54 of the 55 lung cancer patients as having cancer, detected 28 of the 31 breast cancer patients, and gave only three false-positive results (detecting cancer in people who didn't have it).

Did you know?

According to the Migraine Research Foundation, migraines are the third most prevalent illness in the world. Women are most affected (18%), followed by children of both sexes (10%), and men (6%).

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?

There are 60,000 miles of blood vessels in every adult human.

For a complete list of videos, visit our video library