$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · medium · #225

What is the output?

System.out.println('a' + 'b' + "c");
  1. abc
  2. 97bc
  3. ab c
  4. 195c
Evaluation is left to right: 'a' + 'b' adds two chars as ints (97 + 98 = 195), then the String joins.
Play Problem Solving ▸