Given:
It is required that if p instanceof Pair then p.isValid() returns true.
Which is the smallest set of visibility changes to insure this requirement is met?
A. setLeft and setRight must be protected.
B. left and right must be private.
C. isValid must be public.
D. left, right, setLeft, and setRight must be private.
Given:
What is the result?
A. 2,3 4,3 4,5
B. 2,3 4,5 4,5
C. 2,5 4,5 4,5
D. 2,3 4,5 4,3
Given: What is the expected result of javac?
A. javac fails to compile the class and prints the error message, C:\workspace4\Mycar.java:1:error: package java does not exist
B. javac compiles Mycar.java without errors or warnings.
C. javac fails to compile the class and prints the error message, C:\workspace4\Mycar.java:1:error: expected import java.lang
D. javac fails to compile the class and prints the error message, Error: Could not find or load main class Mycar.class
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 methods modify field values? (Choose two.)
A. setAllCounts
B. setACount
C. setGCount
D. setCCount
E. setTCount
Given:
Which two method implementations are correct, when inserted independently in line 1? (Choose two.)
A. Option A
B. Option B
C. Option C
D. Option D
E. Option E
Given:
What is the result?
A. Dr. Who
B. Dr. Null
C. An exception is thrown at runtime.
D. null
Given:
Which statement is true about the Fox class?
A. Fox class does not have to override inhabit method, so long as it does not try to call it.
B. Fox class does not have to override the inhabit method if Forest and Town provide compatible implementations.
C. Fox class must implement either Forest or Town interfaces, but not both.
D. The inhabit method implementation from the first interface that Fox implements will take precedence.
E. Fox class must provide implementation for the inhabit method.