</p> 9. System.out.print(“4 “);
+ ?8 B- d6 j2 p, n! n. E 10. }
; `9 f1 N2 [4 K% C* X 11 public static void main(String []args) {" Q$ t0 E! s# G
12. Test t = new Test();
u. ~# y) j2 j# O% K( Q 13. t.start();1 ~5 d2 L2 e+ V: }
14. }" ~" y3 H/ X8 O3 q: O: |
15. }8 @1 H1 U# c- z" a" n, g
a. Nothing, this is not a valid way to create and start a thread.6 D2 V# o, ^# v, p
b. 1 2
& o7 C6 u( i* b% @5 y0 B( S c. 1 2 3
M ~8 L( W: k" j& m8 q0 ] d. 13 v# B/ S8 E( W2 L! ^8 P& ~
Q57.What must be true for the RunHandler class so that the instances of RunHandler can be used as written in the following code?5 C$ E& s3 b7 x- y4 W+ N
1. class Test {
1 G9 G" c; g1 ]! o6 {3 Z: [ 2. public static void main(String args[]){. _: G7 h# A9 P" F. O" m: O
3. Thread t = new Thread(new RunHandler()); X @) F, A& b
4. t.start();. t; h* d6 L+ M8 v3 i0 B4 U8 o. R
5. }
! K$ \! s, _# c' s% Y+ S 6. }" L* ]; ?4 O* l! F& p7 \1 }
Select all valid answers ?( Y4 o1 H* C3 O# L
a. RunHandler must only implement the java.lang.Runnable interface.; i2 l% m, [/ M
b. RunHandler must only extend the Thread class.
% R1 w5 g- F- k, ?+ i c. RunHandler must extend the Thread class or implement Runnable interface.
, g& S9 A1 |+ h d. RunHandler must provide a run() method declared as public and returning void.
5 i+ O# G0 m/ c$ Z) j7 [ 55. c
$ r0 ]5 U0 k2 [- y3 K 56. b# d/ v2 G5 s3 y2 X, L4 u
57. cd |