Skip to content

Commit

Permalink
Update as on 28-12-2020 (Ebazhanov#910)
Browse files Browse the repository at this point in the history
* Update as on 28-12-2020

* Update

Resolved conflicts in the PR

* update

* Update

Changed Java code formatting
  • Loading branch information
mohsinmsm authored Jan 5, 2021
1 parent fee1255 commit b7d052c
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions java/java-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -859,3 +859,51 @@ public class Solution {
- [ ] instance
- [X] class
- [ ] method

#### Q62. What does this code print?

```java
public static void main(String[] args) {
int x=5,y=10;
swapsies(x,y);
System.out.println(x+"="+y);
}

static void swapsies(int a, int b) {
int temp=a;
a=b;
b=temp;
}
```

- [ ] 10 10
- [X] 5 10
- [ ] 10 5
- [ ] 5 5

#### Q63. What is the result of this code?

```java
try {
System.out.println("Hello World");
} catch (Exception e) {
System.out.println("e");
}
catch (ArithmeticException e) {
System.out.println("e");
}finally {
System.out.println("!");
}
```

- [ ] Hello World
- [X] It will not compile beacuse the second catch statement is unreachable
- [ ] Hello World!
- [ ] It will throw runtime exception

#### Q64. What is not a java keyword

- [ ] finally
- [ ] native
- [ ] interface
- [X] unsigned

0 comments on commit b7d052c

Please sign in to comment.