Skip to content
Sharp

Modern Java · interview question

Which version of Java introduced text blocks?

Multiple choiceEasychapter-12-curatedpremiummodern-javatext-blocks
Choose one answer
Answer and explanation

Correct answer

A. Java 15

Why

Text blocks were introduced in Java 15 as a standard feature, allowing developers to write multiline strings more easily and naturally.

Test yourself on Modern Java

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

Start free test
All Modern Java questions →