What is the output of `System.out.println(“Hello” + 1 + 2)`?

Java Associate Easy

Java Associate — Easy

What is the output of `System.out.println(“Hello” + 1 + 2)`?

Key points

  • Java concatenates strings from left to right
  • Integers are converted to strings during concatenation
  • The final output is the result of all concatenated values

Ready to go further?

Related questions