试题与答案

下列程序执行后的结果是______。package ch1;import java.

题型:单项选择题

题目:

下列程序执行后的结果是______。package ch1;import java.io.*;public class ex22{ static, String filename = "ch1\kfile22.txt"; public static void main(String[] args) { try {FileWriter fr = new FileWriter(filename);PrintWriter pr = new PrintWriter(fr);String name = "xiaoming";String phone = "123456";String age = "12";pr.println(name + ’,’ + phone + ’,’ + age);pr.close();fr.close(); } catch(IOException ioe) {ioe.printStackTrace() }} }

A.在包ch1 中新建一个文件file22.txt, 并且在其中写入一行字符串“xiaomingl2345612”

B.在包ch1中新建一个文件file22.txt,并且在其中写入一行字符串“xiaoming, 123456,12”

C.在包chi中新建一个文件file22.txt,并且在其中写入一行字符串“xiaoming’’

D.抛出IOException

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2019/0408/6c9eb60806d6aa3cf62166b125f4d6e9.html

下面是错误答案,用来干扰机器的。

参考答案:对

试题推荐
题型:完形填空
完形填空。
      When I was about 13, my father would take me on short outings on Saturdays. On the way home,
Dad   1   stopped at the Dairy Queen for 10-cent ice creams. I couldn't   2   it, but I could pray from the 
  3   we started heading home to that corner where we would either go straight for the ice cream or   4   
and go home empty-handed. That corner   5   either mouth-watering excitement or   6  .
      One day, we were heading home, and again I was praying for the   7   sound of his offer. It   8  .
"Would you like an ice cream today?" "That sounds great, Dad!" But then he said, "Would you like to
   9   today?"
      "Twenty cents!" I thought to myself, "I can afford it. I got 25 cents' pocket money and some  10  for
odd jobs (零活). Well,  11  it is enough, ice cream isn't a good use of it."  12 , I said, "Well, in that case,
I guess I'll  13 ." My father just said, "Okay, Son."
      But as we headed home, I realized how wrong I was and begged him to  14 . But he just said, "That's
okay, we don't really need one." I felt  15  for my selfishness and ungratefulness. He didn't mind, or  16  
act disappointed.
      From that I  17  generosity (慷慨) goes two ways and gratefulness (感谢) sometimes costs more than
"thank you". On that day gratefulness would have cost 20 cents and it would have been the  18  ice cream
I'd ever had.
      I'll tell you one more thing. We  19  another trip the next week. As we  20  the corner, I said, "Dad,
would you like an ice cream today? My treat."
( )1. A. suddenly    
( )2. A. expect     
( )3. A. month    
( )4. A. finish     
( )5. A. showed     
( )6. A. anger     
( )7. A. interesting 
( )8. A. came      
( )9. A. serve    
( )10. A. extra     
( )11. A. since     
( )12. A. However   
( )13. A. accept    
( )14. A. turn back   
( )15. A. unsatisfied 
( )16. A. even      
(      )17. A. recognized  
( )18. A. dearest   
( )19. A. made up    
( )20. A. came over   
B. hardly     
B. mention    
B. day      
B. drive     
B. meant    
B. shame     
B. surprising  
B. spoke     
B. treat     
B. limited    
B. as         
B. Therefore   
B. pay      
B. carry on    
B. ashamed    
B. never     
B. learned    
B. worst      
B. prepared for    
B. came left   
C. frequently  
C. wait      
C. weekend    
C. turn     
C. suggested       
C. happiness   
C. beautiful  
C. rung       
C. buy      
C. little     
C. when       
C. Besides    
C. pass       
C. stop by     
C. shameful    
C. only      
C. realized    
C. cheapest    
C. went on    
C. came out      
D. strangely      
D. get            
D. time           
D. return         
D. instructed     
D. disappointment 
D. funny          
D. flew           
D. provide        
D. easy           
D. although       
D. Instead        
D. forbid         
D. give in        
D. crazy          
D. somehow                       
D. found          
D. best           
D. took on        
D. came near      
查看答案
题型:单项选择题

随着人类对火星的了解越来越多,许多科学家,尤其是美国宇航局的研究专家都已经开始探索人类未来移民火星的可行性。对于将火星改造成“绿色星球”的惊人设想,许多科学家都认为至少需要2万年到10万年左右的时间,但美国非赢利性科研组织“火星协会”创始人、美国工程师罗伯特-祖柏林却认为,改造火星的过程大约只要1000年时间就可以完成。
根据上文推断,作者接下来最可能讲述的内容是:

A.罗伯特·祖柏林用1000年改造火星的设想
B.人类对火星探索的构想
C.不同火星改造构想的可行性分析
D.火星将如何被改造成“绿色星球”

查看答案
微信公众账号搜索答案