</p> public string getthreadname(){
6 q5 T9 p) Y2 B$ O return sthreadname;/ `% r+ c) q6 b0 D! S+ w+ j" y" a
}$ g/ }& F' x7 q8 ~* v. j% S
public void go(){
8 t9 ~8 x0 x6 k& D holt first = new holt('first');
" q4 y! i- e) o( { first.start(); ; e! h" O9 l h7 F8 S- O5 Y
; o q$ ]1 e+ e5 z holt second = new holt('second');
% a& W. D4 Y R8 |: F. V second.start();
. C. P1 B0 G, j# ?' G4 \/ h# I. S6 L, b }
y9 ~$ |) ?4 d0 l6 X+ F public void start(){; E1 e. r0 g6 O! F. n/ X
for(int i = 0; i %26lt; 2; i ++){9 n6 ]% ~$ _& M0 Z1 r
system.out.println(getthreadname() +i);
1 {! o- P: w/ q try{; M2 D# n2 @' O
thread.sleep(100);
' V+ C5 D# J9 Y7 X$ _; _ } catch(interruptedexception e){system.out.println(e.getmessage());}
k' J2 Y# b! p2 e$ F- Y }' q1 r; O: f: }) {" q
}
) D; D. I4 @( t0 e( g4 P% b' W3 f }
- C9 V, @' L. F 1) compile time error
; }0 D: A* p" l2 a 2) output of first0, second0, first0, second1
0 S" v+ i# @* A4 L' S0 n' [1 D 3) output of first0, first1, second0, second1
% _! H+ H0 [$ U0 z% H9 o- t' b 4) runtime error
3 {1 X+ w" T. c answer to question 31
$ F( X% |9 j# _$ |$ e/ @3 H --------------------------------------------------------------------------------
8 s5 J& A! h8 A- L& u: d- B* a question 32)2 j% h1 @+ K. j, W; q! r. g
an applet has its layout manager set to the default of flowlayout. what code would be correct to change to another layout manager.! {; E# [4 L2 _* e. B6 d' z8 r& w) T
1) setlayoutmanager(new gridlayout());
) q9 h4 Q) e3 D( x4 X 2) setlayout(new gridlayout(2,2));
* ~% Q/ A1 j# Z" x, T! |% o1 | 3) setgridlayout(2,2);
# ` ], i, B( b) A3 | Y 4) setborderlayout(); |