Skip to content

Commit 1021fc7

Browse files
committed
Update java-multiple-choice-questions-answers.md
1 parent 9eeb766 commit 1021fc7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

java-multiple-choice-questions-answers.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,4 +388,14 @@ D. Three
388388
C. Two
389389
390390
Explanation: All three references point to the String apple. This makes the other two String objects eligible for garbage collection.
391+
```
392+
#### Q. Which of the following does not compile?
393+
A. double num = 2.718;
394+
B. double num = 2._718;
395+
C. double num = 2.7_1_8;
396+
D. None of the above; they all compile
397+
```
398+
B. double num = 2._718;
399+
400+
Underscores are allowed between any two digits in a numeric literal. Underscores are not allowed adjacent to a decimal point
391401
```

0 commit comments

Comments
 (0)