1 . Yo u c an u s e t h e m e t h o d t o t e m p o ra r i l y t o re l e as e t i m e f or o t h e r t h r e a d s .
( a) s u s p e n d ( )
( b ) y i e l d ( )
( c ) s t o p ()
( d ) s l e e p (i nt m i l l i s e c on d s )
2 . W h i ch o f th e f o l l ow i n g m e t h o d i s a s t at i c i n j ava . l an g . T h r e a d ?
( a) j o i n ( )
( b ) r u n ( )
( c ) s l e e p (l o n g)
( d ) s t a rt ( )
3 . W h i ch o f th e f o l l ow i n g s t a t e m e nt i s f al s e ?
( a) A b l o ck i n g q u e u e c au s e s a t h r e ad t o b l o ck w h e n you t ry to r e m ove an e l e m e nt f r o m a n e m p ty q u e u e .
( b ) a b l o cki n g q u e u e h a s a c a p ac i ty.
( c ) A b l o ck i n g q u e u e c au s e s a t h r e ad t o b l o ck w h e n you t ry to a d d a n e l e m e nt t o a f u l l q u e u e .
( d ) T h e B l o ck i n gQ u e u e i nt e r f a c e i s t h e d e r i ve d i nt e r f a c e f o r al l c on c re te b l o cki n g q u e u e c l a s s e s .
4 . W h a t e x c e p t i on ty p e d o e s th e f o l l ow i n g p r o gr am t h row ? p u b l i c c l as s Te s t { p u b l i c s t at i c vo i d m a i n (S t r i n g[ ] ar g s ) { S y s t e m . o u t. p r i nt l n (1 / 0 ) ; } }
( a) S t r i n gI n d e xO u t Of B ou n d s E x c e p t i on
( b ) C l a s s C a s t E x c e p t i o n
( c ) A r i t h m e t i c E x c e p t i on
( d ) A r r ay I n d e x O u tO f B o u n d s E x c e p ti o n
5 . W h a t e x c e p t i on ty p e d o e s th e f o l l ow i n g p r o gr am t h row ? p u b l i c c l as s Te s t { p u b l i c s t at i c vo i d m a i n (S t r i n g[ ] ar g s ) { O b j e c t o = nu l l ; S y s t e m . o u t. p r i nt l n (o . t oS t r i n g( ) ) ; } }
( a) S t r i n gI n d e x Ou t O f B o u n d s E x c e pt i o n
( b ) A r r ay I n d e x O u t O f B ou n d s E x c e p t i o n
( c ) C l a s s C as t E x c e p t i on
( d ) A r i t h m e t i c E x c e p t i o n
6 . W h a t i s d i s p l aye d o n t h e c on s o l e w h e n r u n n i n g t h e f o l l ow i n g p ro g ra m ? c l a s s Te s t { p u b l i c s t at i c vo i d m a i n ( S t ri n g [ ] a r gs ) { t r y { S y s t e m . o u t. p r i nt l n (“ We l c om e t o J ava ) ; } fi n a l l y { S y s t e m . o u t. p r i nt l n (“ T h e fi n al l y c l au s e i s e x e c u t e d ”) ; } } }
( a) We l c om e t o J ava f ol l owe d by T h e fi n al l y c l au s e i s e x e c u t e d i n t h e n e x t l i n e ( b ) T h e fi n al l y c l au s e i s e x e c u t e d
( c ) R u nt i m e E r ro r
( d ) We l c om e t o J ava
7 . W h i ch o f th e f o l l ow i n g s t a t e m e nt i s f al s e ?
( a) I f a c o m p on e nt c an ge n e r a t e a n e ve nt , a ny s u b c l a s s of t h e c o m p o n e nt c an n o t g e n e r a te t h e s a m e ty p e of e ve nt.
( b ) a c o m p on e nt on w h i ch a n e ve nt i s ge n e ra t e d i s c a l l e d t h e s ou r c e ob j e c t .
( c ) E ve r y G U I c o m p on e nt c an ge n e ra t e M ou s e E ve nt , K e y E ve nt , Fo c u s E ve nt , a n d C o m p o n e ntE ve nt .
( d ) A l l t h e e ve nt c l as s e s ar e s u b c l a s s e s o f E ve nt Ob j e c t .
8 . T h e m e t h o d i n t h e A c t i on E ve nt r e t u r n s t h e a c t i o n c o m m an d of t h e b u t t on .( a) g e t A c t i on C o m m an d ( )
( b ) p a ra m S t ri n g ( )
( c ) g e t I D ()
( d ) g e t M o d i fi e r s ( )
9 . To ch e ck w h e t h e r a D E L E T E ke y i s p re s s e d or r e l e as e d , w h i ch h a n d l e r s h ou l d b e u s e d ?
( a) ke y A c t i ve ( K e yE ve nt e )
( b ) ke y Typ e d (K e y E ve nt e )
( c ) ke y I n ac ti ve ( K e y E ve nt e )
( d ) ke y Re l e as e d (K e y E ve nt e )
1 0. S u p p o s e th a t a c o nta i n e r c u s e s a C a rd L ayo u t m a n ag e r p . W h i ch of t he f o l l ow i n g m e th o d i s n o t va l i d ?
( a) c . p . fi r s t ( )
( b ) p . n e x t ( c )
( c ) p . l a s t (c )
( d ) p . p r e v i ou s (c )
1 1. i s a S w i n g l ayou t m a n a ge r t h a t a rr a n ge s c o m p o n e nts i n a r ow o r a c o l u m n . ( a) B o r d e r L ayou t
( b ) G r i d L ayou t
( c ) B ox Layo u t
( d ) F l ow Layo u t
1 2. A J M e nu I t e m i s a s u b c l a s s of .
( a) J C o nta i n e r
( b ) J M e nu
( c ) A b s t r ac tB u t to n
( d ) J B u t t o n
1 3. A J C h e ck B ox M e nu I te m i s n ot a s u b c l as s o f .
( a) J M e nu
( b ) J C o m p o n e nt
( c ) J M e nu I t e m
( d ) A b s t r ac tB u t to n
1 4. a l l ow s yo u t o c r e a t e c u s to m b u t t on s .
( a) A n i n p u t d i al o g
( b ) A c on fi r m a ti o n d i a l og
( c ) A n o p t i on d i al o g
( d ) A m e s s a ge d i al o g
1 5. W h a t i s b e s t t o d e s c ri b e t h e r e l a t i on s h i p b e twe e n J C om p on e nt a n d J B u tt o n ? .
( a) C o m p o s i t i on
( b ) A s s o c i a t i on
( c ) A g gr e g at i o n
( d ) I n h e r i t a n c e
1 6. A n a l yz e t h e f ol l ow i n g c o d e . i m p o r t j ava. aw t . *; i m p o r t j avax . s w i n g . * ; p u b l i c c l as s Te s t { p u b l i c s t at i c vo i d m a i n (S t r i n g[ ] ar g s ) { J Fr a m e f ra m e = n e w J Fra m e ( “ M y Fr a m e ”) ; f r a m e . ge tC o nt e ntPa n e ( ) . ad d ( n e w J B u t t on ( “ OK ”) ) ; f r a m e . ge tC o nt e ntPa n e ( ) . ad d ( n e w J B u t t on ( “ C an c e l ”) ) ; f r a m e . s e t D e f a u l tC l os e Op e ra t i on ( J Fra m e . E X I T O N C L O S E ) ; f r a m e . s e t S i z e ( 2 00 , 2 00 ) ; f r a m e . s e t V i s i b l e ( t r u e ) ; } }
( a) B o t h b u t t on OK an d b u t to n C a n c e l ar e d i s p l aye d a n d b u t t o n OK i s d i s p l aye d o n t h e l e f t s i de o f b u t t on OK .
( b ) O n l y b u tt o n O K i s d i s p l aye d .
( c ) O n l y b u tt o n C a n c e l i s d i s p l aye d .
( d ) B o t h b u t t o n O K an d b u t t on C a n c e l ar e d i s p l aye d a n d b u t t on O K i s d i s p l aye d on t h e ri g ht s i d e o f b u t to n OK .
1 7. T h e m e t h o d c a n b e u s e d to g e t t h e w i d t h o f t h e c om p o n e nt c .
( a) c . g e t S i z e ( )
( b ) c . g e t H e i g ht ( )
( c ) c . g e t D i m e n s i on ( )
( d ) c . g e t W i d t h ()
1 8. T h e c o or d i n a te o f t h e u pp e r - l e f t c or n e r of a f r am e i s .
( a) ( 25 , 2 5 )
( b ) ( 10 , 1 0 )
( c ) ( 0, 0)
( d ) ( 10 0 , 1 00 )
1 9. I f yo u c re at e a J S p i n n e r ob j e c t w i th o u t s p e c i f y i n g a m o d e l , t h e s p i n n e r d i s p l ays .
( a) a s e q u e n c e o f n o n - n e g a ti ve i nt e g e r s
( b ) a s e q u e n c e o f p o s i t i ve i nt e g e r s
( c ) a s e q u e n c e o f i nt e g e r s
( d ) a s e q u e n c e o f d o u b l e val u e s
2 0. Yo u c an ob t a in t h e s e rve r s h os t n a m e by i nvok i n g o n a n a p p l e t.
( a) g e t C o d e B a s e ( ) . ge t H o s t ( )
( b ) g e t C o d e B a s e ( ) . h os t N a m e ( )
( c ) g e t C o d e B a s e ( ) . ge t H o s t N am e ()
( d ) g e t C o d e B a s e ( ) . h os t ( )
B C D C A
A A A D A
C C A C D
C D C C A
Tuesday, April 15, 2008
Subscribe to:
Post Comments (Atom)
About Me
- Be Innovative
- i am simple...........
Blog Archive
-
▼
2008
(122)
-
▼
April
(88)
-
▼
Apr 15
(17)
- remote microscopy
- Unique Locks On Microchips Could Reduce Hardware P...
- Turn Down the Heat … Please
- latest mobile phones
- crystals
- Receiver chip handles DisplayPort interface for de...
- Splice connector’s unisex design eases electronic ...
- JAVA ONLINE 10
- JAVA ONLINE 9
- JAVA ONLINE 8
- JAVA ONLINE 7
- JAVA ONLINE 6
- JAVA ONLINE 5
- JAVA ONLINE 4
- JAVA ONLINE 3
- JAVA ONLINE 2
- JAVA ONLINE 1
-
▼
Apr 15
(17)
-
▼
April
(88)
No comments:
Post a Comment