Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 22e945b

Browse files
Merge pull request #31 from Anup6452/patch-1
Remove duplicate question
2 parents 94e3e24 + 4ccb582 commit 22e945b

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

‎java-multiple-choice-questions-answers.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ D. int num1 = 0, num2 = 0;
4141
```
4242
A. double num1, int num2 = 0;
4343
```
44+
**Explanation**: A. Option A does not compile because Java does not allow declaring different types as part of the same declaration.
45+
4446
## Q. What is the output of following program?
4547
```java
4648
public class Test {
@@ -214,15 +216,6 @@ Output
214216
a : 2
215217
J : 2
216218
```
217-
## Q. Which of the following declarations does not compile?
218-
A. double num1, int num2 = 0;
219-
B. int num1, num2;
220-
C. int num1, num2 = 0;
221-
D. int num1 = 0, num2 = 0;
222-
```
223-
A. double num1, int num2 = 0;
224-
```
225-
**Explanation**: A. Option A does not compile because Java does not allow declaring different types as part of the same declaration.
226219

227220
## Q. What is the output of the following?
228221
```java

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /