问题 填空题

请完善程序(程序文件名: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()
*/

答案

参考答案:JOptionPane

解析: 这些常量都是类JOptionPane当中的。

单项选择题

Pretty in pink: adult women do not remember being so obsessed with the colour, yet it is pervasive in our young girls’ lives. It is not that pink is intrinsically bad, but it is such a tiny slice of the rainbow and, though it may celebrate girlhood in one way, it also repeatedly and firmly fuses girls’ identity to appearance. Then it presents that connection, even among two-year-olds, between girls as not only innocent but as evidence of innocence. Looking around, l despaired at the singular lack of imagination about girls’ lives and interests.

Girls’ attraction to pink may seem unavoidable, somehow encoded in their DNA, but according to Jo Paoletti, an associate professor of American Studies, it is not. Children were not colour-coded at all until the early 20th century: in the era before domestic washing machines all babies wore white as a practical matter, since the only way of getting clothes clean was to boil them. What’s more, both boys and girls wore what were thought of as gender-neutral dresses. When nursery colours were introduced, pink was actually considered the more masculine colour, a pastel version of red, which was associated with strength. Blue, with its intimations of the Virgin Mary, constancy and faithfulness, symbolised femininity. It was not until the mid-1980s, when amplifying age and sex differences became a dominant children’s marketing strategy, that pink fully Came into its own, when it began to seem inherently attractive to girls, part of what defined them as female, at least for the first few critical years.

I had not realised how profoundly marketing trends dictated our perception of what is natural to kins, including our core beliefs about their psychological development. Take the toddler. I assumed that phase was something experts developed after years of research into children’s behaviour: wrong. Turns out, according to Daniel Cook, a historian of childhood consumerism, it was popularised as a marketing trick by clothing manufacturers in the 1930s.

Trade publications counselled department stores that, in order to increase sales, they should create a "third stepping stone" between infant wear and older kids’ clothes. It was only after "toddler" became a common shoppers’ term that it evolved into a broadly accepted developmental stage. Splitting kids, or adults, into ever- tinier categories has proved a sure-fire way to boost profits. And one of the easiest ways to segment a market is to magnify gender differences—or invent them where they did not previously exist.

The author suggests that our perception of children’s psychological development was much influenced by()

A. the marketing of products for children

B. the observation of children’s nature

C. researches into children’s behavior

D. studies of childhood consumption

单项选择题 配伍题