试题详情
单项选择题 import java.awt.*;   public class Test extends Frame {   public Test() {   add(new Label(“Hello”) );   add(new TextField(“Hello”) );   add(new Button(“Hello”) );   pack();   show();    }   public static void main(String args) {   new Test ();   }   }   What is the result? () 

A、 The code will not compile.

B、 A Window will appear containing only a Button.

C、 An IllegalArgumentException is thrown at line 6.

D、 A Window button will appear but will not contain the Label, TextField, or Button.

E、 A Window will appear containing a Label at the top, a TextField below the Label, and a Button  below the TextField.

F、 A Window will appear containing a Label on the left, a TextField to the right of the Label, and a button to the right of the TextField.

  • B
  • 关注下方微信公众号,在线模考后查看

热门试题