Which two statements are true about the modular JDK? (Choose two.)
A. The foundational APIs of the Java SE Platform are found in the java.base module.
B. An application must be structured as modules in order to run on the modular JDK.
C. It is possible but undesirable to configure modules' exports from the command line.
D. APIs are deprecated more aggressively because the JDK has been modularized.
Given:
What is the result?
A. 4
B. 3
C. An exception is thrown at runtime.
D. 5
Given:
Which two allow a.Main to allocate a new Person? (Choose two.)
A. In Line 1, change the access modifier to private private Person() {
B. In Line 1, change the access modifier to public public Person() {
C. In Line 2, add extends Person to the Main class public class Main extends Person { and change Line 3 to create a new Main object Person person = new Main();
D. In Line 2, change the access modifier to protected protected class Main {
E. In Line 1, remove the access modifier Person() {
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: What is the result?
A. is it 1
B. An IndexOutOfBoundsException is thrown at runtime.
C. is it 0
D. this is it 2
E. this is it 3
Which two commands are used to identify class and module dependencies? (Choose two.)
A. jmod describe
B. java Hello.java
C. jdeps --list-deps
D. jar --show-module-resolution
E. java --show-module-resolution
Given: What is the result?
A. [0,0] = Red [0,1] = White [1,0] = Black [1,1] = Blue [2,0] = Yellow [2,1] = Green [3,0] = Violet
B. [0,0] = Red [1,0] = Black [2,0] = Blue
C. java.lang.ArrayIndexOutOfBoundsException thrown
D. [0,0] = Red [0,1] = White [1,0] = Black [2,0] = Blue [2,1] = Yellow [2,2] = Green [2,3] = Violet
Given:
executed with this command: java Main one two three What is the result?
A. 0). one
B. 0). one
1). two
2). three
C. The compilation fails.
D. It creates an infinite loop printing: 0). one 1). two 1). two ...
E. A java.lang.NullPointerException is thrown.
Which statement about access modifiers is correct?
A. An instance variable can be declared with the static modifier.
B. A local variable can be declared with the final modifier.
C. An abstract method can be declared with the private modifier.
D. An inner class cannot be declared with the public modifier.
E. An interface can be declared with the protected modifier.
Given the code fragment:
What is the output?
A. The compilation fails.
B. [-1, -2, -3]
C. [-3, -2, -1]
D. A runtime exception is thrown.
Given:
What is the result?
A. 9
B. An exception is thrown at runtime.
C. 3
D. 6
Given: If file "App.config" is not found, what is the result?
A. Configuration is OK
B. The compilation fails.
C. Exception in thread "main" java.lang.Error: Fatal Error: Configuration File, App.config, is missing.
D. nothing