问题 单项选择题

Passage One

In many countries today, laws protect wildlife. In India the need for such protection was realized centuries ago.

About 300 B. C. an Indian writer described forests that were somewhat like national parks today. The killing of game animals was carefully governed. Some animals were fully protected. Within the forest, nobody was allowed to cut trees, burn wood, or trap animals for their furs. Animals that became dangerous to human visitors were trapped or killed outside the park, so that other animals would not become uneasy.

The need for wildlife protection is greater now than ever before. About a thousand sorts of animals are in danger of extinction, and the speed at which they are being destroyed has been putting on. With mammals, for example, the speed of extinction is now about one sort every year; from A. D. 1 to 1800, the speed was about one sort ever), fifty years. Everywhere, men are trying to solve the problem of saving wildlife while caring for the world’s growing population.

According to the report, men trying to save wildlife are thinking about()as well.

A.the animals in national parks

B.stricter laws against hunting

C.the trees in the forests

D.the needs of people

答案

参考答案:D

解析:

文章的最后一句说明D这一观点。

填空题

请完善程序(程序文件名:Java_3.java)并进行调试。请在下画线处填入正确内容,然后删除下画线。请勿删除注释行和其他已有的语句内容。
[题目要求]
本题的要求是填三个空,改两个错。
该程序是两个整数进行比较,由考生通过输入窗口分别输入两个整数,程序比较出结果。
源程序:
import javax.swing.JOptionPane;
public class Jave_3
 public static void main(String args[])
  String firstNumber, //用户输入第1个字符串
   secondNumber,   //用户输入第2个字符串
   result;       //a string containing the output
  int number1,     //比较的第1个数
   number2;       //比较的第2个数
  //读用户输入的第1个字符串read first number from user as a string
  firstNumber=JOptionPane.showInputDialog("Enter first integer:");
  //读用户输入的第2个字符串read second number from user as a string
  secondNumber=JOptionPane.showInputDialog("Enter second integer:");
  //将字符串类型转换成整数类型
  number1=Integer.parseInt(firstNumber);
  number2=Integer.parseInt(secondNumber);
  result=" ":
  if(number1=number2) (1) //本行有错需修改
  result=number1+"=="+number2:
  if(number1 !=number2) result=number1+"!="+number2;
  if f number1 < number2) result=result+"\n"+number1+"<"+number2;
  if(number1 > number2) result=result+"\n"+number1+">"+number2;
  if(number1 < =number2) result=result+"\n"+number1+"<="+number2;
  if(;number1>=number2) (2) //本行有错需修改
   result=result+"\n"+number1+">="+number2;
  //显示结果
   (3) (
   null,result,"Comparison Results",
    (4) INFORMATION_MESSAGE);
  //程序正常退出
   (5)
 

/*JOptionPane类的常用静态方法如下:
 showInputDialog()
 showConfirmDialog()
 showMessageDialog()
 showOptionDialog()
*/

单项选择题