MCQ
Single Best Answer
Moderate
Q
System.out.println("I said,\"It\'s wise to obey elders.\"");
The output of the above statement is:
ID: #24166
ICSE Computer Application - Class X - 2025 PYQ
80 views
Question Info
#24166Q ID
ModerateDifficulty
ICSE Computer Application - Class X - 2025 PYQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option B
Explanation
(b) I said, "It's wise to obey elders."
Explanation:
-
\"is used to escape double quotes inside a string. -
\'is used to escape a single quote inside a string. -
The correct output includes both escaped characters properly:
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic