</p> class myclass{}( N" s: z1 n+ H" x3 [! R' p6 q6 E5 G7 H
3)
# W7 n4 ~: H8 P0 a' b. ? /*this is a comment */
7 y* V: S! R) z) X( ~5 | C package mypackage;$ U8 d9 H: ]: f. V
import java.awt.*;
1 X: }6 R: c( W; V1 p class myclass{}
8 V- y8 e2 H; Z answer to question 35 y! {" g$ {: ~6 q& ^0 ]4 o
--------------------------------------------------------------------------------
" w. {2 V9 d7 Q, a" R3 I question 4)
9 G. @! c% X- \, @ a byte can be of what size
* I# S% g1 \+ A( [/ p) {& Y 1) -128 to 127" D( L$ F' O) l$ y5 _+ X
2) (-2 power 8 )-1 to 2 power 8
8 |. h% R5 G$ n9 q! w6 I3 R 3) -255 to 256
- p) M! i ]* Y7 f* n 4)depends on the particular implementation of the java virtual machine
* R" C3 s4 Q/ @ r7 k/ [# X answer to question 46 Q) b5 ~4 O; s+ i
--------------------------------------------------------------------------------- {5 n J6 q2 B' n. z8 p
question 5)( b3 V+ Y2 q3 s4 P
what will be printed out if this code is run with the following command line?
5 n" B8 Y9 u& |) I$ f java myprog good morning
4 _- p e: e" ^4 i. f public class myprog{3 [7 U4 e3 m; S* A6 E1 P1 ]& j* M
public static void main(string argv[])' j' s, R1 q0 H+ h+ D
{8 H1 _) W7 J- V8 b7 P0 b, a
system.out.println(argv[2])' T& u9 ~: r1 o f" w& a
}
. {; @% V7 G) Y4 ? }
6 G1 r/ k$ t$ s0 O" [ 1) myprog
2 x4 E) D; l; V- Q% y+ ] 2) good
3 o) }1 K; v2 r. V h 3) morning
' b) b" j0 d5 H9 `& p/ \ 4) exception raised: 'java.lang.arrayindexoutofboundsexception: 2'
" t1 a6 e% l! x- I* j% l) o answer to question 5
% q! i; C( J" K$ p3 i --------------------------------------------------------------------------------
# D" |3 {+ N) d; O* p question 6)
% V9 \" h5 u8 p1 Y) E A) F$ ^ which of the following are keywords or reserved words in java?7 O& q/ L: p8 M1 T3 e, \1 a8 P
1) if
; x) h2 o+ c+ z+ s 2) then
' d8 l& {" [, @* U4 l. u 3) goto1 t4 c1 ]+ `# q; E, _
4) while |