Q35
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);
A.
Throws an exception as string and int are not compatible for addition
B.
hellow9
AnswerC.
9hellow
D.
Compilation error
E.
None of these
Answer: Option B
Solution
Answer: Option B
No explanation is given for this question Let's Discuss on Board