Multiple choice technology programming languages

What is the output for the below code ? public class Test { public static void main(String... args) { int a =5 , b=6, c =7; System.out.println("Value is "+ b +c); System.out.println(a + b +c); System.out.println("String "+(b+c)); } }

  1. Value is 67 18 String 13

  2. Value is 13 18 String 13

  3. Value is 13 18 String

  4. Compilation fails

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

First, string concatenation evaluates "Value is " + b + c as "Value is 67". Next, numeric addition of a + b + c yields 18. Finally, the expression "String " + (b+c) evaluates the parenthesis first to get 13, printing String 13.