Skip to content

Commit b4112f2

Browse files
committed
Update java-multiple-choice-questions-answers.md
1 parent fd8cfb4 commit b4112f2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

java-multiple-choice-questions-answers.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,14 @@ A. double num1, int num2 = 0;
225225
**Explanation**: A. Option A does not compile because Java does not allow declaring different types as part of the same declaration.
226226

227227
#### Q. What is the output of the following?
228+
```java
228229
public static void main(String... args) {
229230
String chair, table = "metal";
230231
chair = chair + table;
231232
System.out.println(chair);
232233
}
233-
A. metal
234+
```
235+
A. metal
234236
B. metalmetal
235237
C. nullmetal
236238
D. The code does not compile

0 commit comments

Comments
 (0)