Multiple choice general knowledge history

  1. public class Question { Public static void main(String args[]) { int i=10; System.out.println("i="+++i); }

  1. i=0

  2. i=11

  3. Invalid argument to operation

  4. None

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

Java is case-sensitive. 'Public' must be 'public', and '+++i' is invalid syntax. The pre-increment operator is '++', so '++ + ++i' or '+ + + i' would be required to parse, making this a compilation error.