Exam813 SampleQuestion
Exam813 SampleQuestion
A) byte b1 = b1011;
B) byte b2 = 1011b;
C) byte b3 = 0b1001;
D) byte b4 = 0xb001;
A) Number1: 7
Number2: 7
B) Number1: 7
Number2: 111_000
C)Number1: 0b0111
Number2: 0111000
D) Compilation fails.
3. Given:
The test1.txt file is available and the test2.txt file is not available.
A) The test1.txt file is renamed to the test2.txt file and the test1.txt file is removed in a single
operation.
B) The test1.txt file is renamed to the test2.txt file and the test1.txt file is removed in two
distinct operation.
C) The test1.txt file is copied and renamed to the test2.txt file in a single operation.
C) @FunctionalInterface
public interface Useful{ default void doStuff(){} }
A) Fred
Jim
Sheila
B) Fred
Jim
C) Fred
D) Compilation fails.
A) 1:5:0
B) 1:6:0
C) 0:0:0
D) Compilation fails.
8. Given the code fragment:
Answers:
1. C
2. A
3. A
4. B
5. A
6. B
7. D
8. B