Sail E0 Webinar
Question
What is the output for the below code ?
1. public class Test{
2. public static void main(String[] args){
3. byte b = 6;
4. b+=8;
5. System.out.println(b);
6. b = b+7;
7. System.out.println(b);
8. }
9. }
Options:
A .  14 21
B .  14 13
C .  Compilation fails with an error at line 6
D .  Compilation fails with an error at line 4
E .  None of these
Answer: Option C

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers