A.lies to
B.lay in
C.lies in
D.lay to
第1题:
classParent{
Stringone,two;
publicParent(Stringa,Stringb){
one=a;
two=b;}
publicvoidprint(){System.out.println(one);}}
publicclassChildextendsParent{
publicChild(Stringa,Stringb){
super(a,b);
}
publicvoidprint(){
System.out.println(one+"to"+two);
}
publicstaticvoidmain(Stringarg[]){
Parentp=newParent("south","north");
Parentt=newChild("east","west");
p.print();
t.print();
}
}
Whichofthefollowingiscorrect?()
第2题:
请将下列程序的空白处补充完整。
Importjava.awt.*;
PublicclassEll_4
{
Publicstaticvoidmain(Stringargs[])
{
Framef=newFrame(“BorderLayout”);
fiadd(“North”,newbuRon(“North”));
f.add(“East”,newbutton(“East”));
f.add(“West”,newbutton(“West”));
f.add(“South”,tf);
f.setSize(200,200)
fipack();
fisetVisible(true);
}
}
第3题:
表达“东西南北”四个方位时,英语的习惯一般是______?
A.north, east, south and west
B.east, west, north and south
C.north, south, east and west
D.east, south, west and north
第4题:
importjava.awt.*;publicclassXextendsFrame{publicstaticvoidmain(Stringargs){Xx=newX();x.pack();x.setVisible(true);}publicX(){setLayout(newBordrLayout());Panelp=newPanel();add(p,BorderLayout.NORTH);Buttonb=newButton(North”);p.add(b):Buttonb=newButton(South”);add(b1,BorderLayout.SOUTH):}}Whichtwostatementsaretrue?()
A.Thebuttonslabeled“North”and“South”willhavethesamewidth.
B.Thebuttonslabeled“North”and“South”willhavethesameheight.
C.Theheightofthebuttonlabeled“North”canveryiftheFrameisresized.
D.Theheightofthebuttonlabeled“South”canveryiftheFrameisresized.
E.Thewidthofthebuttonlabeled“North”isconstanteveniftheFrameisresized.
F.Thewidthofthebuttonlabeled“South”isconstanteveniftheFrameisresized.
第5题:
下列程序在Frame中设定BorderLayout布局管理器,选择正确的语句填入程序的横线处。 import java.awt.*; public class ex43 extends Frame { public static void main(String[] args) { ex43 bj = new ex43("BorderLayout"); ______ obj.add("North", new Button("North")); obj.add("South", new Button("Sourth")); obj.add("East", new Button ("East")); obj.add("West", new Button ("West")); obj. add ("Center", new Button ( "Center" ) ); obj.pack(); obj. setVisible (true); } public ex43(String str) { super (str); } }
A.obj.setLayout(new BorderLayout());
B.setLayout(new Borderkayout());
C.setLayout(BorderLayout());
D.obj.setLayout(BorderLayout());