问题 单项选择题

下列情况中,不会使线程返回所持有的对象锁的是

A.当synchronized()语句块执行完毕

B.当调用了线程的suspend()方法

C.当在synchronized()语句块中出现异常(Exceptio

D.当持有锁的线程调用该对象的wait()方法

答案

参考答案:B

解析: 本题考查Java线程中对象的加锁及其操作。对象加锁的使用非常灵活,定要注意。 对象的锁在如下几种情况下由持有线程返还:当synchronized()语句块执行完后,所以选项A错误;当在synchronized()语句块中出现异常(exception),所以选项B错误:当持有锁的线程调用该对象的wait()方法,此时该线程将释放对象的锁,所以选项D错误。而当调用了线程的suspend()方法只是使线程暂时停止执行,可以使用其他线程调用resume()方法恢复执行,所以选项B正确。

阅读理解

There are many famous writers in the English world, among whom Jane Austen  (1775—1817) has been popular with all ages. But then Jane Austen wrote her novels in England, she was writing about a world that most of us would not recognize.

But today Austen’s books are in greater demand than ever. In the last ten years, five of the six novels have been made into Hollywood films, while her books continue to be bestsellers. So why is Austen still popular?

Richard Jenkyns, a professor of English at Oxford University, argues that her novels still appeal to people because they focus on issues that are as relevant today as they were when she wrote them. Her novels are about women trying to find a perfect husband, but also explore issues surrounding marriage, friendship and the family. “The plots are fairly timeless stories about human interaction which are familiar to us,” Jenkyns says.

The most famous book Austen wrote is Pride and Prejudice, a love story between Elizabeth Bennett and Mr. Darcy. At first the two characters do not get on. They finally fall in love, but still have to overcome opposition (反对) to their relationship from their families.

All of Austen’s books are easy to read, making them popular with children and adults, but they work on different levels so people can take what they need from them, author Kate Henry says.

Austen is often praised as the greatest romance writer in the English language, so it is surprising she remained unmarried. “Maybe she was too much of a romantic, waiting for a perfect man,” Henry says.

小题1:Which of the following can NOT explain why Austen is still popular?

A.Her novels are all about love and marriage.

B.Her novels still make sense to today’s people.

C.All her novels are easy to read.

D.Her novels benefit people of different reading levels.小题2: The underlined word “relevant” in Paragraph 3 probably means ______.

A.strange

B.related

C.funny

D.unimportant小题3:According to Henry, Austen remained unmarried because ______.

A.she was used to the life of being single

B.the perfect man didn’t appears in her life

C.she was too busy to think of marriage

D.she was afraid of marriage小题4:Which of the following is NOT true according to the passage?

A.More and more people like reading Austen’s novels.

B.Austen died when she was 42 years old.

C.Pride and Prejudice is a novel about love.

D.Austen is often regarded as the greatest writer in the English language.

多项选择题