问题 单项选择题

Java Applet的几个方法的执行顺序,正确的是( )。

A.init→start→destroy→stop

B.init→start→stop→destroy

C.start→init→destroy→stop

D.start→init→stop→destroy

答案

参考答案:B

解析: 该题考查对Java Applet生命周期的几个函数执行顺序的理解。Applet生命周期是指从Applet下载到浏览器,到用户退出浏览器,终止Applet运行的过程。Applet运行时,首先由浏览器调用init()方法,然后调用start()方法,使Applet成为激活状态,当Applet被覆盖时,调用stop()停止线程,最后关闭浏览器调用 deserog()。故本题答案是B。

阅读理解

Once there was a piano player in a bar(酒吧). People came just to hear him play. But one night, a lady asked him to sing a song.

‘I don’t sing,’ said the man.

But the lady told the waiter, ‘I’m tired of listening to the piano. I want the player to sing!’

The waiter shouted across the room, ‘Hey, friend! If you want to get your money, sing a song!’

So he did. He had never sung in public before. Now he was singing for the very first time! Nobody had ever heard the song Mona Lisa sung so beautifully!

He had talent(天赋) he was sitting on! He may have lived the rest of his life as a no-name piano player in a no-name bar. But once he found, by accident, that he could sing well, he went on working hard and became one of the best-known singers in the US. His name was Nat King Cole.

You, too, have skills and abilities. You may not feel that your talent is great, but it may be better than you think. With hard work, most skills can be improved. Besides, you may have no success at all if you just sit on your talent.

小题1:The lady asked the player to sing a song because ______________.

A.she had paid him for this

B.she knew him very well

C.she wanted to have a change

D.she enjoyed his singing小题2: Nat King Cole succeeded because ______________.

A.the lady helped him a lot

B.he caught the chance

C.he continued to play in the bar

D.he stopped playing the piano小题3:From the story we know if you have some talent, you should ______________.

A.hide it and wait

B.ask others for help

C.pay no attention to it

D.work hard to improve yourself

解答题