Given:
Which two allow a.Main to allocate a new Person? (Choose two.)
A. In Line 1, change the access modifier to privateprivate Person() {
B. In Line 1, change the access modifier to publicpublic Person() {
C. In Line 2, add extends Person to the Main classpublic class Main extends Person {and change Line 3 to create a new Main objectPerson person = new Main();
D. In Line 2, change the access modifier to protectedprotected class Main {
E. In Line 1, remove the access modifierPerson() {
Given:
Which three classes successfully override printOne()? (Choose three.)
A. Option A
B. Option B
C. Option C
D. Option D
E. Option E
F. Option F
Given:
Which two statements can be added at line 1 in Bar to successfully compile it? (Choose two.)
A. public List
B. public ArrayList
C. public List
D. public List
E. public List
F. public ArrayList
Given:
What is the result?
A. An exception is thrown at runtime.
B. 42=(x+y)=42
C. 42=(x+y)=6
D. 6=(x+y)=42
E. 6=(x+y)=6
Given the code fragment:
var pool = Executors.newFixedThreadPool(5);
Future outcome = pool.submit(() > 1);
Which type of lambda expression is passed into submit()?
A. java.lang.Runnable
B. java.util.function.Predicate
C. java.util.function.Function
D. java.util.concurrent.Callable
Given the code fragment: What is the result?
A. EUR -> 0.84 GBP -> 0.75 USD -> 1.00 CNY -> 6.42
B. The compilation fails.
C. CNY -> 6.42 EUR -> 0.84 GBP -> 0.75 USD -> 1.00
D. USD -> 1.00 GBP -> 0.75 EUR -> 0.84 CNY -> 6.42
Given:
What is the result?
A. An indexOutofBoundsException is thrown at runtime.
B. At once 0
C. Hat at store 4
D. At once 1
E. Hat at store 1
Given:
and the code fragment:
Which two Map objects group all employees with a salary greater than 30 by neighborhood? (Choose two.)
A. Option A
B. Option B
C. Option C
D. Option D
E. Option E