Skip to content
Sharp

Core Java · interview question

Which method would you use to print a formatted string to the console without a newline at the end?

Multiple choiceEasychapter-1-curatedpremiumcore-javaconsole-input-and-output
Choose one answer
Answer and explanation

Correct answer

B. System.out.print()

Why

The 'System.out.print()' method prints text to the console without adding a newline character at the end, allowing the next output to continue on the same line.

Test yourself on Core Java

A free test with instant, explained results. No account needed.

Start free test
All Core Java questions →