s Q u i z 1 { p u b l i c Q u i z 1 ( ) { h t t p : / / w a t e r m i n t . o r g } } ! Q u i z 1 . j a v a : 4 : Τϥ ʔ : ࣜ ͷ ։ ࢝ ͕ ෆ ਖ਼ Ͱ ͢ } ^ Q u i z 1 . j a v a : 5 : Τϥ ʔ : ߏ จ ղ ੳ த ʹ ϑ Ν Πϧ ͷ ऴ Θ Γ ʹ Ҡ Γ · ͠ ͨ } ^ Τϥ ʔ 2 ݸ
s Q u i z 2 { p u b l i c s t a t i c S t r i n g l u c k e y L e t t e r ( S t r i n g s e e d ) { i n t i = M a t h . a b s ( s e e d . h a s h C o d e ( ) ) % s e e d . l e n g t h ( ) ; r e t u r n s e e d . s u b s t r i n g ( i , i + 1 ) ; } ! p u b l i c s t a t i c v o i d m a i n ( S t r i n g . . . a r g s ) { S y s t e m . o u t . p r i n t l n ( l u c k e y L e t t e r ( " a c e t o t h i e n o n e r u l e d o m " ) ) ; } }
n t h r e a d " m a i n " j a v a . l a n g . S t r i n g I n d e x O u t O f B o u n d s E x c e p t i o n : S t r i n g i n d e x o u t o f r a n g e : - 8 a t j a v a . l a n g . S t r i n g . s u b s t r i n g ( S t r i n g . j a v a : 1 9 5 2 ) a t Q u i z 2 . l u c k e y L e t t e r ( Q u i z 2 . j a v a : 4 ) a t Q u i z 2 . m a i n ( Q u i z 2 . j a v a : 7 )
s Q u i z 3 { p u b l i c s t a t i c v o i d m a i n ( S t r i n g . . . a r g s ) { S y s t e m . o u t . p r i n t l n ( " H e l l o " ) ; S y s t e m . o u t . c l o s e ( ) ; S y s t e m . o u t . p r i n t l n ( " W o r l d " ) ; } }
s Q u i z 3 { p u b l i c s t a t i c v o i d m a i n ( S t r i n g . . . a r g s ) { S y s t e m . o u t . p r i n t l n ( " H e l l o " ) ; S y s t e m . o u t . c l o s e ( ) ; S y s t e m . o u t . p r i n t l n ( " W o r l d " ) ; } } ! $ j a v a Q u i z 3 H e l l o
s Q u i z 4 { p u b l i c s t a t i c v o i d m a i n ( S t r i n g [ ] a r g s ) { f o r ( b y t e b = B y t e . M I N _ V A L U E ; b < B y t e . M A X _ V A L U E ; b + + ) { i f ( b = = 0 x 9 9 ) { t h r o w n e w R u n t i m e E x c e p t i o n ( " N i n e t y n i n e " ) ; } } } }
s Q u i z 5 { p u b l i c s t a t i c v o i d m a i n ( S t r i n g . . . a r g s ) { t r y { S y s t e m . o u t . p r i n t l n ( " D u k e " ) ; S y s t e m . e x i t ( 0 ) ; } f i n a l l y { t h r o w n e w R u n t i m e E x c e p t i o n ( " N e v e r d i e " ) ; } } }
s Q u i z 6 { p u b l i c Q u i z 6 ( O b j e c t o ) { S y s t e m . o u t . p r i n t l n ( " J a v a ! " ) ; } p u b l i c Q u i z 6 ( b y t e [ ] a ) { t h r o w n e w R u n t i m e E x c e p t i o n ( " O o p s ! " ) ; } p u b l i c s t a t i c v o i d m a i n ( S t r i n g . . . a r g s ) { n e w Q u i z 6 ( n u l l ) ; } }
6 . j a v a ! $ j a v a Q u i z 6 E x c e p t i o n i n t h r e a d " m a i n " j a v a . l a n g . R u n t i m e E x c e p t i o n : O o p s ! a t Q u i z 6 . < i n i t > ( Q u i z 6 . j a v a : 6 ) a t Q u i z 6 . m a i n ( Q u i z 6 . j a v a : 9 )
s Q u i z 7 { p u b l i c s t a t i c v o i d g r e e t ( ) { S y s t e m . o u t . p r i n t l n ( " J J U G ! " ) ; } p u b l i c s t a t i c v o i d m a i n ( S t r i n g . . . a r g s ) { ( ( Q u i z 7 ) n u l l ) . g r e e t ( ) ; } }
s Q u i z 8 { s t a t i c S h o r t s ; p u b l i c s t a t i c v o i d a d d ( s h o r t a , s h o r t b ) { S y s t e m . o u t . p r i n t l n ( a + b ) ; } p u b l i c s t a t i c v o i d m a i n ( S t r i n g . . . a r g s ) { a d d ( s , ( s h o r t ) 1 0 ) ; } }
E x c e p t i o n i n t h r e a d " m a i n " j a v a . l a n g . N u l l P o i n t e r E x c e p t i o n a t Q u i z 8 . m a i n ( Q u i z 8 . j a v a : 7 )