问题 问答题 简答题

垃圾回收的优点和原理。并考虑2种回收机制。

答案

参考答案:Java语言中一个显著的特点就是引入了垃圾回收机制,使c++程序员最头疼的内存管理的问题迎刃而解,它使得Java程序员在编写程序的时候不再需要考虑内存管理。由于有个垃圾回收机制,Java中的对象不再有"作用域"的概念,只有对象的引用才有"作用域"。垃圾回收可以有效的防止内存泄露,有效的使用可以使用的内存。垃圾回收器通常是作为一个单独的低级别的线程运行,不可预知的情况下对内存堆中已经死亡的或者长时间没有使用的对象进行清楚和回收,程序员不能实时的调用垃圾回收器对某个对象或所有对象进行垃圾回收。回收机制有分代复制垃圾回收和标记垃圾回收,增量垃圾回收。

单项选择题
阅读理解

阅读理解。

     For photographers lacking training, experience and even the ability to click a shutter button, they produce

remarkable pictures. Under the sea, deep in the woods and high in the sky, furry, feathery and leathery-skinned

creatures are opening up vistas (远景) by taking cameras where no human can go.

     This is the world of animal-borne imagine celebrated last month at a conference sponsored(supported) by

the National Geographic Society for the 20th anniversary of its Crittercam, the device that started it all.

     Since its debut (首次公开露面) in 1987 on the back of a turtle, the Crittercam and similar devices

developed by others have grown smaller and more powerful.

     "It's more than just a camera now," said Greg Marshall, the marine biologist and now filmmaker who

invented the Crittercam."We are now including more instruments to gather more data while at the same time

The idea of attaching video cameras to animals came to Mr. Marshall in 1986 on a dive off Belize when a shark

apporoached him. When the animal quickly turned away, he noticed a shark with a sucker fish on its belly. He

came up with the idea that putting a camera in place of the sucker fish would allow people to witness the

shark's behavior without disturbing it.

     Crittercams have been attached to sharks, sea lions and other marine animals, and, more recently, to land

animals.

     Birds are a new addition, Mr.Marshall said. Dr. Christian Rutz of Oxford recently reported on tiny cameras

called feathercams that monitor the crows in the South Pacific. It has discovered that crows are smarter than

anyone knew they not only use twigs (嫩枝) and grass stems as tools to root out food, but they also save their

favorite tools to use again.

     Tracey L.Rogers, director of the Australian Marine Mammal Research Center in Sydney, said crittercam

was a powerful tool in her work with leopard seals (豹斑海豹) in Antarctica. "In studying animals," Dr.

Rogers said at the meeting,"you want to see how our animal models align (与……一致) with reality. With a

camera, you actually see what they do. You don't have to guess."

1. What's the text mainly about?

A. The advantages of crittercam.

B. The development of Crittercams in the past 20 years.

C. How crittercam was invented.

D. How crittercam works.

2. What inspired Marshall to invent crittercam?

A. The sight of sucker fish clinging to a shark on a dive.

B. The thought of how to photograph animals better.

C. Noticing a shark eating a sucker fish on a dive.

D. Seeing a shark with a camera on its belly on a dive.

3. According to Dr. Rogers, crittercam ____.

A. can clear up all your doubts about animals

B. is the most powerful tool in studying animals

C. enabled her to observe the crows in the South Pacific closely

D. helped a lot with her research on leopard seals in Antarctica

4. All of the following are improvements of crittercams EXCEPT that ____.

A. the size is becoming smaller

B. more instruments are involved to gather more data

C. they allow researchers to see where and how animals live

D. they are able to be applied to smaller animals such as birds