问题 单项选择题

继承是Java语言的一个重要机制,所有的Java类都继承自根类( )。

A.Class

B.Object

C.String

D.Date

答案

参考答案:B

解析: 本题考查Java的继承机制。选项A错误,Class类封装了类和对象的属性特征,包含着解释Java类的信息。选项B正确,Object类处于Java类层次结构的最上层,是所有类的父类。也就是说,所有Java语言中的类都是直接或间接继承Object类得到的。选项C错误, String类是字符串类,用于构造字符串常量。选项D错误,Date类是日期类,提供了处理日期、时间的多种方法。

完形填空
完形填空。
     A teacher started his first job at a primary school and wanted to make a good impression (印象) on the
children. When he noticed a boy  1  all by himself,  2  the other children were playing football, he walked up
to him and asked, "Are you alright?"
     The boy told him  3  was fine and the teacher left him. A few minutes later,  4 , he noticed that the boy
was still standing alone and had not  5 he other boys.
     This time, the teacher decided to  6  what was wrong. He came up to the boy again and said, "Hi, are  7  
you're not feeling left out? Would you like me to be your friend?"
     The boy  8  uncomfortable, but after a little hesitation (犹豫), he said, "Maybe". Encouraged by his
progress, the teacher asked,"Tell me,  9  are you standing here alone?"
     "Because," the said with clear anger in his  10 , "I'm the goalkeeper."
( )1. A. standing  
( )2. A. when     
( )3. A. anything  
( )4. A. so       
( )5. A. helped   
( )6. A. care about 
( )7. A. angry   
( )8. A. felt    
( )9. A. what     
( )10. A. noise   
B. sitting 
B. while  
B. nothing 
B. besides 
B. covered 
B. belong to
B. sure   
B. replied 
B. why   
B. sound  
C. learning  
C. before   
C. everything 
C. except   
C. stopped  
C. find out  
C. happy   
C. bothered  
C. how    
C. voice   
D. laughing 
D. unless   
D. something
D. however  
D. joined   
D. let down 
D. patient                              
D. smiled   
D. where    
D. point    
填空题 案例分析题