Return to site

JAVA CERTIFICATION QUESTION: Text blocks and the string indent method in Java

· java,ocp

Text blocks ease programming long string literals, but you need to know the details.

Given the code fragment:

 

Assuming that the following character: ◌ denotes whitespace characters, what is the result? Choose one.

A) Runtime exception at line n2

 

B)

---

A

◌◌

◌◌◌B

---

 

C)

---

A

 

◌B

---

 

D)

---

A

 

 

---

 

 

 

 

 

 

·ꓷ uoᴉʇdo sᴉ ɹǝʍsuɐ ʇɔǝɹɹoɔ ǝɥꓕ ·uoᴉsnʅɔuoꓛ