Given:
Which would cause s to be AQCD?
A. s.replace(s.indexOf("A"), s.indexOf("C"), "Q");
B. s.replace(s.indexOf("B"), s.indexOf("C"), "Q");
C. s.replace(s.indexOf("B"), s.indexOf("B"), "Q");
D. s.replace(s.indexOf("A"), s.indexOf("B"), "Q");
Given:
Which two constructors will compile and set the class field strings? (Choose two.)
A. Option A
B. Option B
C. Option C
D. Option D
E. Option E
Which two describe reasons to modularize the JDK? (Choose two.)
A. easier to understand the Java language
B. improves security and maintainability
C. easier to expose implementation details
D. improves application robustness
E. easier to build a custom runtime linking application modules and JDK modules
Given: What is known about the Sportscar class?
A. The Sportscar class is a subclass of Automobile and inherits its methods.
B. The Sportscar subclass cannot override setTurbo method from the superclass Automobile.
C. The Sportscar class is a superclass that has more functionality than the Automobile class.
D. The Sportscar class inherits the setTurbo method from the superclass Automobile.
Given: Which statement is true?
A. Class Tester does not need to import java.time.LocalDate because it is already visible to members of the package test.
B. All classes from the package java.time. are loaded for the class Diary.
C. Only LocalDate class from java.time package is loaded.
D. Tester must import java.time.LocalDate in order to compile.
Given: What is the result?
A. null
B. nothing
C. It fails to compile.
D. java.lang.IllegalAccessException is thrown.
E. Student
Given: Which two lines can replace line 1 so that the Y class compiles? (Choose two.)
A. map.forEach((k, v) -> set(v)));
B. set(map.values());
C. super.set(List
D. super.set(map.values());
E. set(map)
Given: What is the result?
A. NullPointerException is thrown at line 4.
B. NullPointerException is thrown at line 10.
C. A compilation error occurs.
D. Hello