Q. What is the output for the below code ?

Code:
 public class Test
 { 
       public static void main(String[] args)
 { 
             byte b = 6; 
             b+=8;
             System.out.println(b);
             b = b+7;
             System.out.println(b); 
       } 
 }
  • (A) 14 21
  • (B) 14 13
  • (C) Compilation fails with an error at line 6
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (C) Compilation fails with an error at line 6

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
254
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Sandeep
Publisher
πŸ“ˆ
88%
Success Rate