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


Dinolord

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

 

Did you know?

The first oral chemotherapy drug for colon cancer was approved by FDA in 2001.

Did you know?

In most climates, 8 to 10 glasses of water per day is recommended for adults. The best indicator for adequate fluid intake is frequent, clear urination.

Did you know?

Vampire bats have a natural anticoagulant in their saliva that permits continuous bleeding after they painlessly open a wound with their incisors. This capillary blood does not cause any significant blood loss to their victims.

Did you know?

The average person is easily confused by the terms pharmaceutics and pharmacology, thinking they are one and the same. Whereas pharmaceutics is the science of preparing and dispensing drugs (otherwise known as the science of pharmacy), pharmacology is the study of medications.

Did you know?

Astigmatism is the most common vision problem. It may accompany nearsightedness or farsightedness. It is usually caused by an irregularly shaped cornea, but sometimes it is the result of an irregularly shaped lens. Either type can be corrected by eyeglasses, contact lenses, or refractive surgery.

For a complete list of videos, visit our video library