题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-12-17 01:11:31

[单项选择]关于以下程序段的执行结果,说法正确的是( )。
public class borley extends Thread
(
public static void main(String argv[])

borley b=new borley( );
b.start( );

public void run( )

System.out.println( "running" );


A. 编译通过并执行,但无输出
B. 编译通过并执行,输出:running
C. 产生错误,没有thread类对象
D. 产生错误,没有通道到达thread包

更多"关于以下程序段的执行结果,说法正确的是( )。 public cla"的相关试题:

[填空题]下列程序段欲重复执行LOOP开始的程序段50次。
MOV A, #32H
LOOP: ……
DEC A
DJNZ ACC,LOOP
错误:______
改正:______
[单项选择]有如下程序段,该程序段执行完后,共执行循环的次数是 Private Sub Command1_Click( ) Tota1=0 Counter=1 Do Print Counter Tota1=tota1+Counter Print total Counter=Counter+1 If total>=10 Then Exit Do End lf Loop While Counter<=10 End Sub
[单项选择]执行下面程序段,屏幕上将输出( )。
public class Test
private int x=10,y=20;
public Test (int x,int y)
System.out.println (x+this.x);
System.out.println (y+y);
public static void main (String[] args)
Testt= new Test(30,50);

A. 无输出
B. 20
C. 40
D. 40
[单项选择]有如下的程序段,该程序段的执行完后,共执行循环的次数是 Private Sub Command1_Click( ) total=0 Counter=l Do Print Counter total=total+Counter Print total Counter=Counter+1 If total>=10 Then Exit Do End If Loop While Counter<=10 End Sub
A. 5
B. 10
C. 12
D. 20
[单项选择]下列程序段执行后,变量c的值为( )。
public class Test
public static void main(String[ ] args)
float a=10, b=9, c=8;
if (--a==B) c= --a/c;
System. out. println (c) ;


A. 1.125
B. 1.0
C. 1.25
D. 0.0
[单项选择]执行下列程序段之后,变量n的值为( )。
public class Test
public static void main(String[ ] args)
int y = 2;
int z = 3;
int n = 4;
n=n+-y* z/n;
System. out. println(n);


A. 3
B. -1
C. -12
D. -3
[填空题]执行下面的程序段,输出结果为 【7】
public class Q public Static Void main(String args[])

int anar[]=new int[5];
System.out.println(anar[0]);


[单项选择]执行下面程序段,屏幕上将输出( )。 public class Test { private int x=10,y=20; public Test (int x,int y) { System.out.println (x+this.x); System.out.println (y+y); } public static void main (String[] args) { Testt= new Test(30,50); } }
A. 无输出
B. 20 40
C. 40 100
D. 40 70
[填空题]执行下面的程序段,输出结果为 【8】 。 public class Q { public static void main(String argv[]) { int anar[]=new int[5]; System. out.println(anar[0]); } }
[单项选择]下列程序段执行后,x5的结果是______。 public class ex42 { public static void main(String[] args) { int xl = 8; int x2 = 12; int x3=7; int x4; int x5; x4 = x1 > x2 x1 : x2+ x1; x5 = x4 > x3 x4 : x3; System.out.println(x5); } }
A. 11
B. 20
C. 10
D. 12
[单项选择]执行下列程序段之后,输出的结果是( )。
public class Test
public static void main(String[ ] args)
byte a = 2;
short b = 3;
long c = 4;
c=a%b*4%b;
System. out. println(c) ;


A. 2
B. 1
C. -1
D. -2
[填空题]执行下列程序段后输出的结果是 【10】
public class Test
public static void main(String args[])
int x,y;
for(y=1,x=1;y<=50;y++)
if(x>=10)break;
if(x%2==1)
x+=5:
continue;

x-=3;

System.out.println(y);


[填空题]执行下面的程序段,输出结果为 【8】 public class Q { public static void main(String argv[] { int anar[]=new int [5]; System.out.println(anar[0]; } }
[填空题]分析下面程序段,试回答:
(1)该程序段是什么结构的程序;
(2)该程序段执行后,(DL)=______,屏幕上显示的字符是______。
Buffer DB 0CH

MOV AL,Buffer
CALLFAR PTR SUBROUT

SUBROUT PROC FAR
CM PAL, 10
JC K1
ADD AL,7
K1: ADD AL,30H
MOV DL,AL
MOV AH,2
INT 21H
RET
SUBROUT ENDP
[单项选择]执行下面程序段的输出结果为______。
public class Q

public static void main(String argv[])

int anar[]=new int[5];
System. out. println(anar[O]);


A. 0
B. 1
C. 2
D. 5
[填空题]执行下列程序段后输出的结果是______。
public class Test
public static void main(String args[])
int x,y;
for(y=1,x=1;y<=50;y++)
if(x>=10)break;
if (x%2==1)
x+=5;
continue;

x-=2;

System.out.println(y);


我来回答:

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

订单号:

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