| 1. | What will be the output of the program? class SC2 void start() String foo() |
|||||||
Answer: Option D Explanation: Because all of these expressions use the + operator, there is no precedence to worry about and all of the expressions will be evaluated from left to right. If either operand being evaluated is a String, the + operator will concatenate the two operands; if both operands are numeric, the + operator will add the two operands. |
