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.
第1题:
A. public static void main();
B. public static void main( String args );
C. public static void main( String args[] );
D. public static void main( Graphics g );
E. public static boolean main( String a[] );
第2题:
下面那个是java应用程序主类中正确的main方法?
A.public void main(String args[])
B.static void main(String args[])
C.public static void Main(String args[])
D.public static void main(String args[])
第3题:
设x,y均为已定义的类名,下列声明对象x1的语句不可能正确的是
A.public x x1=new y();
B.x x1=x();
C.x x1=new x();
D.public y x1=new x();
第4题:
下面哪个是Java应用程序主类中正确的main方法?
A.public void main(String args[])
B.static void main(String args[])
C.public static void main(String args[])
D.public static void Main(String args[])
第5题:
下列哪个是Java应用程序主类中正确的main方法?
A.public void main (String args[ ])
B.static void main (String args[ ])
C.public static void Main (String args[])
D.public static void main (String args[ ])