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

[单项选择]

阅读下列代码段
abstract class Person{
public Person(String n){
name=n;
}
public______String getDescription( );
public String getName( ){
}
private String name;
}
在下画线处应填入的修饰符是()


A. static
B. abstract
C. protected
D. final

更多"阅读下列代码段 abstract class Person{ publ"的相关试题:

[单项选择]

阅读下列一个支持多线程并发操作的堆栈类代码段
public class MyStack{
private int idx=0;
private int[]data=new int[8];
public______void push(int i){
data[idx]=i;
idx + +;
}
……
}
在下画线处应填入的是()


A. synchronized
B. wait
C. blocked
D. interrupt
[单项选择]下列代码段执行结果为( )。 public class Test { public static void main(String args[ ]) { System.out.println("abc"+3+4+5); System.out.println(3+4+5+"abc"); } }
A. 编译出错
B. abc345和abc345
C. abc和12
D. abc345和12abc
[单项选择]下面代码段的输出结果为( )。 public class Test { public static void main(String sss[]) { int i=0xFFFFFFF1; int j=~i; } }
A. 0
B. 1
C. 14
D. -15
[单项选择]下列代码段的执行结果为( )。 public class BitOperator { public static void main(String args[ ]) { int a=-67,b=116,c=78,d; d=~c>>2&(a|~B) ; System.out.println ("d="+D) ; } }
A. d=70
B. d=67
C. d=78
D. d=116
[单项选择]下列代码段的输出结果为( )。 public class priority { public static void main(String args[]) { int a=10,b=4,c=20,d=6; System.out.println(a+c%b); System.out.println(a++*b+c--d); } }
A. 1040
B. 1096
C. 8060
D. 96 60
[单项选择]执行下列代码段之后,x的值为______。 public class ex25 { public static void main(String[] args) { int x=12; int m=x%5; x>>>=m; System.out.println(x); }
A. 7
B. 3
C. 0
D. 1
[单项选择]执行下列代码段之后,变量z的值为______。 Public class Test8 { public static void main(String[] args) { int x=2; int y=3; int z=4; z-....= y-x--; System.out.println(z); }
A. 1
B. 2
C. 3
D. 4
[单项选择]阅读下列代码 public class Test{ public static void main(String args[]){ System.out.println(89>>1); } } 其运行结果是【 】
A. 44
B. 45
C. 88
D. 90
[单项选择]阅读下面程序 public class ConcatTest {  public static void main(String[] args) {   String str1="abc";   String str2="ABC":   String str3=str1.concat(str2);   System.out.println(str3);  } } 程序运行的结果是
A. abc
B. ABC
C. abcABC
D. ABCabc
[单项选择]

阅读下面程序
public class ConcatTest{
public static void main(String[] args) {
String strl = "abc";
String str2 = "ABC";
String str3 = str1.concat(str2);
System.out.println(str3);
}
}
程序的运行结果是:()


A. abe
B. ABC
C. abcABC
D. ABCabc
[单项选择]阅读下列代码 public class Test 2005{ public static void main(String args[]){ System.out.println(~(0xa5)&0xaA) ; } } 其运行结果是【 】
A. 0xa5
B. 10
C. 0x50
D. 0xaa

我来回答:

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

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码