可学答题网 > 问答 > SCJP程序员认证考试题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

import java.awt.*;   p


import java.awt.*;   public class X extends Frame {   public static void main (String args) {   X x = new X();   x.pack();   x.setVisible(true);   }  public X() {   setLayout (new BordrLayout());   Panel p = new Panel ();   add(p, BorderLayout.NORTH);   Button b = new Button (“North”);   p.add(b):   Button b = new Button (“South”);   add(b1, BorderLayout.SOUTH):   }   }   Which two statements are true?()

  • A The buttons labeled “North” and “South” will have the same width.
  • B The buttons labeled “North” and “South” will have the same height.
  • C The height of the button labeled “North” can very if the Frame is resized.
  • D The height of the button labeled “South” can very if the Frame is resized.
  • E The width of the button labeled “North” is constant even if the Frame is resized.
  • F The width of the button labeled “South” is constant even if the Frame is resized.
参考答案
参考解析:
分类:SCJP程序员认证考试题库
相关推荐

1、import java.awt.*;  import&

import java.awt.*; import java.applet.*; public class ButtonDemo extends Applet{ public void init() &...

2、若有定义语句:double a,+P=&;a;以下叙述中错误的是( )

若有定义语句:double a,+P=&a;以下叙述中错误的是( )。A定义语句中的*号是一个问址运算符B定义语句中的*号是一个说明符C定义语句中的P只能存放double类型变量的地址...

3、2008年9月,某公司卖出12月到期的S&P500指数期货合约,期指

2008年9月,某公司卖出12月到期的S&P500指数期货合约,期指为l400点,到了l2月份股市大涨,公司买入l00张12月份到期的S&P500指数期货合约进行平仓,期指点为1570点。S&P500指数...

4、import java.awt.*;  import&

import java.awt.*; import java.applet.*; pulic class DrawRect extends Applet {  Public void paint...

5、有如下程序段int *p,a=10,b=1;p=&a; a=*p+b

有如下程序段int *p,a=10,b=1;p=&a; a=*p+b;执行该程序段后,a的值为A.12 B.10 C.11 D.编译出错A12 B10 C11 D编译出错

6、有如下程序段int *p,a=10,b=1;p=&a; a=*p+b

有如下程序段int *p,a=10,b=1;p=&a; a=*p+b;执行该程序段后,a的值为A12B11C10D编译出错