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

Author Question: What is the output of the following code?String s = "University";s.replace("i", "ABC");System.out.println(s); (Read 38 times)

fasfsadfdsfa

  • Hero Member
  • *****
  • Posts: 554

Question 1

Suppose s1 and s2 are two strings. Which of the following statements or expressions are incorrect?
◦ s1 >= s2
◦ String s3 = s1 + s2
◦ s1.charAt(0) = '5'
◦ String s = new String("new string");
◦ int i = s1.length

Question 2

What is the output of the following code?

String s = "University";
s.replace("i", "ABC");
System.out.println(s);

◦ UnABCversity
◦ UniversABCty
◦ UnABCversABCty
◦ University


Related Topics

Need homework help now?

Ask unlimited questions for free

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

ebe

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




fasfsadfdsfa

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


anyusername12131

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

 

Did you know?

Hyperthyroidism leads to an increased rate of metabolism and affects about 1% of women but only 0.1% of men. For most people, this increased metabolic rate causes the thyroid gland to become enlarged (known as a goiter).

Did you know?

Atropine was named after the Greek goddess Atropos, the oldest and ugliest of the three sisters known as the Fates, who controlled the destiny of men.

Did you know?

Patients who have undergone chemotherapy for the treatment of cancer often complain of a lack of mental focus; memory loss; and a general diminution in abilities such as multitasking, attention span, and general mental agility.

Did you know?

Stevens-Johnson syndrome and Toxic Epidermal Necrolysis syndrome are life-threatening reactions that can result in death. Complications include permanent blindness, dry-eye syndrome, lung damage, photophobia, asthma, chronic obstructive pulmonary disease, permanent loss of nail beds, scarring of mucous membranes, arthritis, and chronic fatigue syndrome. Many patients' pores scar shut, causing them to retain heat.

Did you know?

If you could remove all of your skin, it would weigh up to 5 pounds.

For a complete list of videos, visit our video library