
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 output?

A. I am an object array
B. The compilation fails due to an error in line 1.
C. I am an array
D. I am an object
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: Which code, when inserted at one or more marked positions, would allow classes B and C to compile?

A. @Override // position 3 void x () {} // position 3 @Override // position 3 public void z() { } // position 3 // position 2
B. @Override public void z() { } // position 3
C. implements A // position 1 @Override // position 2
D. public void z() { } // position 3
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:

What must be added in line 1 to compile this class?
A. catch(IOException e) { }
B. catch(FileNotFoundException | IndexOutOfBoundsException e) { }
C. catch(FileNotFoundException | IOException e) { }
D. catch(IndexOutOfBoundsException e) { } catch(FileNotFoundException e) { }
E. catch(FileNotFoundException e) { } catch(IndexOutOfBoundsException e) { }
Examine this excerpt from the declaration of the java.se module:

What does the transitive modifier mean?
A. Only a module that requires the java.se module is permitted to require the java.sql module.
B. Any module that requires the java.se module does not need to require the java.sql module.
C. Any module that attempts to require the java.se module actually requires the java.sql module instead.
D. Any module that requires the java.sql module does not need to require the java.se module.
Given: What is the result?

A. Good Morning, Potter
B. Good Night, Potter
C. Good Morning, Harry
D. Good Night, Harry
What makes Java dynamic?
A. At runtime, classes are loaded as needed, and new code modules can be loaded on demand.
B. The runtime can process machine language sources as well as executables from different language compilers.
C. The Java compiler uses reflection to test if class methods are supported by resources of a target platform.
D. The Java compiler preprocesses classes to run on specific target platforms.