Java认证模拟题及分析5


作者:刀断水 | 来源:Examlink | 日期:07-27 | 字体: [ ]

本文简介:you are using the gridbaglayout manager to place a series of buttons on a frame. you want to make the size of one of the buttons bigger than the text it contains.

question 56)
you are using the gridbaglayout manager to place a series of buttons on a frame. you want to make the size of one of the buttons bigger than the text it contains. which of the following will allow you to do that?
1) the gridbaglayout manager does not allow you to do this
2) the setfill method of the gridbaglayout class
3) the setfill method of the gridbagconstraints class
4) the fill field of the gridbagconstraints class

answer to question 56

--------------------------------------------------------------------------------
question 57)
which of the following most closely describes a bitset collection?
1) a class that contains groups of unique sequences of bits
2) a method for flipping individual bits in instance of a primitive type
3) an array of boolean primitives that indicate zeros or ones
4) a collection for storing bits as on-off information, like a vector of bits
answer to question 57

--------------------------------------------------------------------------------
question 58)
you have these files in the same directory. what will happen when you attempt to compile and run class1.java if you have not already compiled base.java
//base.java
package base;
class base{
protected void amethod(){
system.out.println('amethod');
}//end of amethod
}//end of class base
package class1;
//class1.java
public class class1 extends base{
public static void main(string argv[]){
base b = new base();
b.amethod();
}//end of main
}//end of class1


1) compile error: methods in base not found
2) compile error: unable to access protected method in base class
3) compilation followed by the output 'amethod'
4)compile error: superclass class1.base of class class1.class1 not found
answer to question 58

--------------------------------------------------------------------------------
question 59)
what will happen when you attempt to compile and run the following code
class base{
private void amethod(int ibase){
system.out.println('base.amethod');




用户名: 新注册) 密码: 匿名评论 [所有评论]

评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
  • 2007年国家计算机等级考试 JAVA认证 JAVA真题 JAVA模拟试题
如果你觉得一篇文章有用,你可以在每篇后面参与评论,或者查看其他人的评论,请保证你的评论对大家友好。
点这里评论
或者您可以来资源论坛参与讨论,一切都是免费的,不过可能需要麻烦您注册一下。
点这里讨论
把你的文章登陆在这里,让大家来分享你的文章。请立即登陆发表!
点这里投稿