Question 140

What is printed by the Java statement? System.out.println(7 / 2 + 'A');

What is printed by the Java statement? System.out.println(7 / 2 + 'A');
  1. ACompile error
  2. B68
  3. C3.5A
  4. D3A
Show answerHide answer

Correct answer: (B) 68

Explanation

7 / 2 = 3 (int) and 'A' = 65; 3 + 65 = 68.

From DSSSB TGT Computer Science Full Mock Test 1

This is question 140 of DSSSB TGT Computer Science Full Mock Test 1. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.