Which is the output of the below code fragment:
System.out.print(“The result is: “ + (3+2))
System.out.println(“You did a great job!”)
A. The result is + (3+2)You did a great job!
B. The result is + 5You did a great job!
C. The result is 5You did a great job!
D. The result is 5 You did a great job
None of them are correct since they do not contain a colon after the 'is'. If option C contained a colon, then it would be correct.
Comments
Leave a comment