Q157 Which of the following are true?
& w- R+ c- ~ ^+ V+ e2 o" l T A If a package statement is included in a source code file, it must appear as the first non-blank line.9 j$ h! O0 k( Y/ k# _: }; f, t
B If an import statement is included in a source code file, it must appear as the first non-blank line.
/ P7 o8 n2 A" s0 _+ t% b, e9 `7 t C If a main() method is included in a source code file, it must appear as the first non-blank line.
' d8 z- p' \( A- F D If a public interface is declared in a source code file, it must have the same name as the source code file.2 t- [/ v: l4 h' n8 b D, _' z L
Q158 Which of the following are true about this method declaration?" D; R0 o5 f7 j0 F* O) T
void myMethod (String s) {
& R3 u7 X/ q: Z2 H Z9 ^% N' ^ }' i, p l9 e% F! m, d8 }& K
A myMethod() is static
# n( W, }" ^" ] B myMethod() does not return a value.
4 i. S# ^$ G a) h C myMethod() is abstract.
5 N0 _" b, S1 T# h D myMethod() may not be accessed outside of the package in which it is declared.
$ w' a7 @6 C) `; m Q159 If an object with a finalize() method has been garbage collected, which of the following are true about that object?
/ a0 ]6 x3 D$ v6 T A The object became unreachable.2 _% r! }6 L }( R W
B The object’s finalized() method was invoked by the garbage collector." W- Q" J5 a6 i
C The memory used by the object is subject to reuse.# s2 `; t3 M, G {7 j1 I' x
D The object did not implement any interfaces.
! k( k9 A& W4 u% x# s/ G Q157 AD
( k' W/ @8 y; g7 A% b Q158 BD$ B- ~! s. t1 _5 f5 U* ?& L. x1 ?4 X
Q159 ABC |