Important Java Mcq 1

Which of these is an incorrect string literal?

a) “Hello World”

b) “Hello\nWorld”

c) “\”Hello World\””

d) “Hello
world”

Answer

d) “Hello

world”

Explanation:

All string literals must begin and end in the same line.

Related MCQs
Aniket Malik

Aniket Malik

CERTIFIED TUTOR/TRAINER WITH 300+ REVIEWS

Facing difficulty with

this concept?