Bird
0
0

Which of the following is the correct syntax to print "Hello" and then move to a new line in Kotlin?

easy📝 Syntax Q12 of 15
Kotlin - Basics and JVM Runtime
Which of the following is the correct syntax to print "Hello" and then move to a new line in Kotlin?
Aprintln("Hello")
Bprint("Hello")
Cprintln Hello
Dprintln["Hello"]
Step-by-Step Solution
Solution:
  1. Step 1: Check syntax correctness

    Only println("Hello") uses correct function call syntax with parentheses and quotes.
  2. Step 2: Verify output behavior

    println("Hello") prints "Hello" and moves to a new line automatically.
  3. Final Answer:

    println("Hello") -> Option A
  4. Quick Check:

    Correct syntax with println = A [OK]
Quick Trick: Use parentheses and quotes exactly for print/println [OK]
Common Mistakes:
MISTAKES
  • Missing parentheses around arguments
  • Using square brackets instead of parentheses
  • Omitting quotes around strings

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kotlin Quizzes