Q. Find the output of the following program.

Code:
public class Solution{
       public static void main(String[] args){
                     byte x = 127;
                     x++;
                     x++;
                     System.out.print(x);
       }
}
  • (A) -127
  • (B) 127
  • (C) 129
  • (D) 2
πŸ’¬ Discuss
βœ… Correct Answer: (A) -127

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
364
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Chandrakant
Publisher
πŸ“ˆ
87%
Success Rate