Sail E0 Webinar
Question
What could be output of the following fragment of code?public class Test{ public static void main(String args[]){ String x = "hellow";int y = 9;System.out.println(x += y); } }
Options:
A .  Throws an exception as string and int are not compatible for addition
B .  hellow9
C .  Compilation error
D .  None of these
E .  9hellow
Answer: Option B

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