Practice · 2 of 8
MCQ: What does this print?
CHALLENGE
Difficulty: advanced+25 XP
What does this print?
``java
public static void addBang(String s) { s = s + "!"; }
// in main:
String t = "ready";
addBang(t);
System.out.print(t);
`
A. ready!
B. !
C. compile error
D. ready`
Print your answer as: the option letter, then your explanation of why it is correct and why each other option is wrong. First line must start with the letter.
Press Submit to check your solution.
Back to lesson: Practice: MCQ set 1: read the misconception