Q. What will be the output for the below code ?

Code:
1. public class Test{
2.       public static void main(String[] args){
3.             byte i = 128;
4.             System.out.println(i);
5.       }
6. }
  • (A) 128
  • (B) 0
  • (C) Compilation fails with an error at line 3
  • (D) Compilation fails with an error at line 4
πŸ’¬ Discuss
βœ… Correct Answer: (C) Compilation fails with an error at line 3

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
195
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Jatin Dubey
Publisher
πŸ“ˆ
82%
Success Rate