填空题

下列是一个类的定义,将程序段补充完整。    class A {     String s;     【 】int a=66;    A(String sl) { s=sl;}    static int geta( ) { return a;}   }

【参考答案】

static
<上一题 目录 下一题>
热门 试题

单项选择题
阅读下面程序import javax.swing.JOptionPane;public class BreakLabelTest{public static void main (String args[]){String output= ;stop:{for(int row=1;row<10;row++){for(int column=1;column<=5;column++){if(row=5)break stop;output+= * ;}output+= n ;}output+= nLoops terminated normally ;}JOptionPane.showMessageDialog(null,output, 用一个标志测试break语句”,JOptionPane.INFORMATION_MESSAGE);System.exit(0);}}程序运行结果是【 】
A.窗口中有5行*****
B.窗口中有5行****
C.窗口中有4行*****
D.窗口中有6行*****
单项选择题
下列程序的输出结果是( )。classA{int i,j;A(int i,int j){ this.i=i;this.j=j;}void print( ){ System.out.println( i= +i+ + j= +j)}class B extends A{int in;B (int i,int j,int m){super(a,B) ;this.m=m;}void print( ){ Sytem.out.println( m+ +m);}}class C {public static void main (strang argsⅡ){ B b:new B(1,2,3);b.print( );}}
A. i=1 j=2 m=3
B. m=3
C. i=3 j=2
D. m=1 i=1
相关试题
  • 阻塞状态根据产生的原因可分为【 】、等待...
  • 一个关系表的行称为【 】。
  • Java对象串行化技术,主要是通过【 】类和...
  • 设a = 8,则表达式 a > > > 2...
  • 下列程序的功能是显示用户在命令行方式下指...