更多"按要求填空 abstract class SuperAbstract "的相关试题:
[单项选择]阅读下面程序
public class OperatorsAndExpressions
void equalsMethodl( )
String s1=new String("how are you");
String s2=new String("how are you");
System.out.printIn (s1==s2);
public static void main (String args[])
OperatorsAndExpressions OperAndExp=new OperatorsAndExpressions( );
//用于复合类型数据的"= ="运算符
OperAndExp.equalsMethodl( );
程序运行结果是______。
A. ==
B. true
C. false
D. equal
[单项选择]下列程序的输出结果是 ( )
Public class fff
void printValue(int m)
doSystem.out.println("The value is"+m);
whilE(--m>10)
public static void main(String arg[])
int i=10;
Test t=new Test( );
t.printValue(i);
A. 8
B. 9
C. 10
D. 11
[单项选择]下列程序的输出结果是
public class fff
void printValue (int m)
do System.out.println("The value is" +m);
while(--m>10)
public static void main (String arg[])
int i=10;
Test t= new Test( );
t. printValue(i);
A. 8
B. 9
C. 10
D. 11
[单项选择]下列程序的输出结果是( )。
public class fff
void printValue(int m)
do
System.out.println("The value is"+m);
while(--m>10);
public static void main(String arg[])
int i=10;
fff =new fff( );
t.printValue(i);
A. 8
B. 9
C. 10
D. 11
[单项选择]下列程序的输出结果是 ( )
class Derao
void test( )
Systeme.out.print("NO");
void test (int i)
System.out.print(a);
void test(int a,int b)
System.out.print(a+b);
class Test
public static void main(String args[])
Demo de=new Demo( );
de.test( );
de.test5.;
de.test(6,8);
A. No568
B. 568No
C. No514
D. 86No5
[单项选择]如下程序的输出结果是( )。
public class Test
void printValue(int m)
do
System.out.println("The value is"+m);
while( --m>10)
public static void main(String args[])
int i=10;
Test t=new Test( );
t.printValue(i);
A. The value is 8
B. The value is 9
C. The value is 10
D. The value is 11
[单项选择]如下程序的输出结果是( )。
public class Test
void printValue(int m)
do
System.out.println("The value is"+m);
while(--m > 10 )
public static void main(String args[])
int i=10;
Test t= new Test( );
t.printValue(i);
A. The value is 8
B. The value is 9
C. The value is 10
D. The value is 11
[单项选择]下列程序的输出结果是( )。 public class fff void printValue (int m) doSystem.out.println("The value is”+m): while (--m>10) public static void main(String arg []) int i=10; Test t=new Test( ); t.printValue(i);
A. 8
B. 9
C. 10
D. 11
[单项选择]阅读下面程序
public class Increment
public static void main (String args[]
int c;
c=5;
System.out.printIn(c);
System.out.printIn(c++)j
System.out.printIn (c);
程序运行结果是______。
A. 5
B. 5
C. 6
D. 6
[填空题]下列程序段的输出结果为 【10】 。
public class Test
void printValue(int m)
do
Systern.out,println("The value is "+m);
while(-m>10);
public static void main(String arg[])
int i=10;
Test t=new Test( );
t.print Value(i);
[单项选择]若有如下类定义:
class B
void fun1( )
private:
double varl;
public:
void fun2( )
;
class D://public B
private:
void fun3( )
;
已知obj是类D的对象,下列语句中不违反类成员访问控制权限的是
A. obj.fun1( );
B. obj.varl;
C. obj.fun2( );
D. obj.fun3( );
[填空题]public class Test
public static void main(String[ ] args)
String name[ ]=new String[5];
for(int i=0; i<args. length; ++i) name[i] = args[i];
System. out. println(name[2]);
命令行中的输入为:java Test a b
程序的输出是 【11】 。
[单项选择]阅读下列代码
public class Test
public static void main(String args[])
String s = "Test";
switch (s)
case "Java": System. out. print("Java"); break;
case "Language": System. out. print("Language"); break;
case "Test": System. out. print("Test"); break;
其运行结果是( )。
A. Java
B. Language
C. Test
D. 编译出错
[填空题]public class Sum
public static void main(String [] args)
int j=10;
System.out.println("j is : "+j);
calculate(j);
System.out.println("At last, j is : "+j);
static void calculate (int j)
for (int i = 0;i<10;i++)
j++;
System.out.println("j in calculate( ) is: "+j);
输出结果为:
j is : (1)
j in calculate( ) is : (2)
At last j is : (3)
[单项选择]有如下程序
public class Sun
public static void main(String args[ ])
int x=0;
int n=0;
while(x<50)
x=(x+2)*(x+3);
n=n+1;
System.out.println(n+"和"+x);
上述程序的运行结果是( )。
A. 1和0
B. 2和72
C. 3和50
D. 4和168
[单项选择]下列程序的输出结果是______。
public class Test
void printValue(int m)
do
System. out. println("The value is"+m)
while(--m>10)
public static void main(String args[])
int i=10;
Test t=new Test( );
t. printValue(i);
A. The value is 8
B. The value is 9
C. The value is 10
D. The value is 11
[单项选择]阅读下面程序
public class MyVal
public static void main(String[]args)
MyVal m=new MyVal( );
m.amethod( );
public void amethod( )
boolean b[]=new Boolean[5];
程序编译或运行的结果是
A. 1
B. null
C. ""
D. 编译不通过
[单项选择]有以下程序
public class Sun
public static void main(string args[ ])
int a, b;
for(a=1, b=1; a<=100; a++)
if(b>=10)
break;
if (b%3==1)
b+=3;
continue;
System.out.println(
A. ;
B. 6
C. 5
D. 4