摘要:
如下代码,执行test()函数后,屏幕打印结果为() public class ByteTest { public void add(Byte b) { b = b++; } public void test() { Byte a = 127; Byte b = 127; add(++a); Sys 阅读全文
posted @ 2021-08-24 19:14
fridays
阅读(86)
评论(0)
推荐(0)
摘要:
以下代码输出结果为: public class Test { public static void main(String args[]) { int x = -5; int y = -12; System.out.println(y % x); } } 答案:-2 取模运算,结果的符号和被除数符号 阅读全文
posted @ 2021-08-24 16:22
fridays
阅读(565)
评论(0)
推荐(0)
摘要:
有关线程的叙述正确的是()多选 A、可以获得对任何对象的互斥锁定 B、通过继承Thread类或实现Runnable接口,可以获得对类中方法的互斥锁定 C、线程通过使用synchronized关键字可获得对象的互斥锁定 D、线程调度算法是平台独立的 答案:CD 阅读全文
posted @ 2021-08-24 14:55
fridays
阅读(1318)
评论(0)
推荐(0)
摘要:
下面哪个流类不属于面向字符的流() A、BufferedWriter B、FileInputStream C、ObjectInputStream D、InputStreamReader 答案:BC 补充IO的总结图 阅读全文
posted @ 2021-08-24 14:47
fridays
阅读(63)
评论(0)
推荐(0)
摘要:
以下代码段执行后的输出结果为: public class Test { public static void main(String args[]) { int i = -5; i = ++(i++); System.out.println(i); } } 答案是:编译错误 阅读全文
posted @ 2021-08-24 14:38
fridays
阅读(60)
评论(0)
推荐(0)
摘要:
已知如下类定义: class Base { public Base (){ //... } public Base ( int m ){ //... } public void fun( int n ){ //... } } public class Child extends Base{ // m 阅读全文
posted @ 2021-08-24 14:00
fridays
阅读(182)
评论(0)
推荐(0)
摘要:
以下语句的结果是 Math.floor(-8.5)=( ) 答案:(double)-9.0 floor: 求小于参数的最大整数。返回double类型 n. 地板,地面 例如:Math.floor(-4.2) = -5.0 ceil: 求大于参数的最小整数。返回double类型 vt. 装天花板; 例 阅读全文
posted @ 2021-08-24 11:28
fridays
阅读(449)
评论(0)
推荐(0)
摘要:
下列代码的输出: public class foo { public static void main(String sgf[]) { StringBuffer a=new StringBuffer(“A”); StringBuffer b=new StringBuffer(“B”); operat 阅读全文
posted @ 2021-08-24 11:17
fridays
阅读(120)
评论(0)
推荐(0)

浙公网安备 33010602011771号