Single Choice Not Set

QWhat will be output of following program?
public class Test{
      public static void main(String[] args){
            byte b=127;
            b++;
            b++;
            System.out.println(b);
      }
}

ID: #2026 Java Data Types and Variables - MCQ 1,150 views
Question Info
#2026Q ID
Not SetDifficulty
Java Data Types and Variables - MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 2
  • B 129
  • C -127
  • D Compiler error
Correct Answer

Explanation

-127

Share This Question

Challenge a friend or share with your study group.