问题 单项选择题

阅读下列代码段,选出该代码段的正确文件名( )。
class A

void methodl()

System.out.println("methodl in class A");


public class B

void method2()

System.out.println("method2 in class B");

public static void main(String args[])

System.out.println("main in class B");

A.java

B.class

C.class

D.java

答案

参考答案:D

解析: Java源程序文件是以.java为后缀的,Java字节码文件以.class为后缀,而且 Java源文件中只能有一个public类,该类的名字为源文件名,程序段中类B是以public修饰的,因此源程序文件名为B.java。

完形填空
完形填空。
     A girl named Helen in my class had a terrible accident.As she was running to the bus in order
not to miss it, she slipped on some ice and fell__1__the rear wheels of the bus.She__2__the
accident, but was paralyzed from the waist__3__.I went to see her, in my 13yearold mind thinking
she wouldn't live__4__from then on.
     Over the years, I moved and didn't think__5__about Helen after that.Three years ago, in Florida,
my oldest son was__6__by a car while riding his bike,__7__a terrible brain injury.__8__I was
looking after him, a lady who said she was the hospital's social worker called.It was a particularly__9__
day.I burst into tears for no__10__and hung up.
     A short time later, a beautiful woman, in a__11__, rolled into my son's room with a box of tissues.
After 16 years, I still recognized Helen.I told her__12__I was, and after we both__13__the shock of
that, she began to tell me about her life.She had married, had children and gotten her degree so that she
could__14__ the path for those less  __15__than her.She told me that if there was anything she could
give me, it would be__16__.
     Looking at this wonderful, giving person, I felt__17__.But I also felt the first hope I had felt since
then.From this person that I thought would have no__18__of life; I learned that where there is life, there
is hope.My son miraculously__19__and we moved back north, but I owe Helen a__20__that I can
never repay.
( )1.A.into      
( )2.A.escaped    
( )3.A.down      
( )4.A.normally  
( )5.A.many      
( )6.A.collapsed  
( )7.A.making    
( )8.A.Before    
( )9.A.forgettable
( )10.A.reason    
( )11.A.coat      
( )12.A.how      
( )13.A.got across
( )14.A.build    
( )15.A.fortunate
( )16.A.hope      
( )17.A.confident
( )18.A.quantity  
( )19.A.worsened  
( )20.A.life      
B.over      
B.resisted  
B.up        
B.comfortably
B.much      
B.driven    
B.causing    
B.While      
B.tiring    
B.excuse    
B.suit      
B.where      
B.got off    
B.smooth    
B.money      
B.dream      
B.selfish    
B.way        
B.recovered  
B.bill      
C.under      
C.sacrificed
C.in        
C.seriously  
C.less      
C.drawn      
C.resulting  
C.After      
C.trying    
C.matter    
C.wheelchair
C.what      
C.got out    
C.take      
C.powerful  
C.fancy      
C.small      
C.quality    
C.disappeared
C.success  
D.onto          
D.survived      
D.out            
D.optimistically
D.little        
D.hit            
D.leading        
D.Since          
D.unconscious    
D.account        
D.hurry          
D.who            
D.got through    
D.follow        
D.wealthy        
D.ideal          
D.depressed      
D.standard      
D.overcame      
D.debt       
单项选择题