题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-25 19:57:24

[填空题]按要求填空
abstract class SuperAbstract
void a( )…
abstract void b( );
abstract int c(int i);

interface AsSuper

void x( );

abstract class SubAbstract extends SuperAbstract implements AsSuper

public void b( )…
abstract String f( );

public class InheritAbstract extends SubAbstract
public void x( )…
public int c(int i ) …
public String f( )…
public static void main(String args[])
InheritAbstract instance=new InheritAbstract( );
instance.x( );
instance.a( );
instance.b( );
instance.c(100);
System.out.println(instance.f( ));


在以上这段程序中:
抽象类有:SuperAbstract和 (1)  (写出类名)
非抽象类有:       (2)  (写出类名)
接口有:         (3)  (写出接口名)
AsSuper中的x( )方法是(4)方法,所以在InheritAbstract中必须对它进行(5)

更多"按要求填空 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

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码