【单选题】【消耗次数:1】
下面代码运行后的输出结果为( ) 。 public class X6_1_5 { public static void main(String[] args) { AB aa = new AB(); AB bb; bb = aa; System.out.println(b@@equals(aa)); } } class AB{ int x = 100; }
true
false
编译错误
100
参考答案:
复制
纠错
相关题目
【单选题】 下列程序的运行结果是( ) 。 public class X5_1_2 extends x{ int ab() { static int aa=10; aa++; System.out.println(aa); } public static void main(String[] args) { X5_1_2 x=new X5_1_2(); x.ab(); } }
①  10
②  11
③  编译错误
④  运行成功,但不输出
【单选题】 编译运行以下程序后,关于输出结果的说明正确的是 ( ) public class Conditional{ public static void main(String args[ ]){ int x=4; System.out.println(“value is “+ ((x>4) ? 9.9:9)); } }
①  输出结果为:value is 99.9
②  输出结果为:value is 9
③  输出结果为:value is 9.0
④  编译错误
【单选题】 以下程序的运行结果是:( ) public class Increment{ public static void main(String args[]){ int c; c = 2; System.out.println(@@; System.out.println(c++); System.out.println(@@; } }
①  2 2 2
②  2 3 3
③  2 2 3
④  3 4 4
【单选题】 下列程序执行的结果是( ) 。 public class X7_1_6 { public static void main(String[] args) { try{ return; } finally{ System.out.println(Finally); } } }
①  程序正常运行,但不输出任何结果
②  程序正常运行,并输出 Finally
③  编译通过,但运行时出现异常
④  因为没有 catch 子句,因此不能通过编译
【单选题】 阅读以下代码: import java.io.*; import java.util.*; public class foo{ public static void main (String[] args){ String s; System.out.println(s= + s); } } 输出结果应该是:( )
①  代码得到编译,并输出“s=”
②  代码得到编译,并输出“s=null”
③  由于String s没有初始化,代码不能编译通过
④  代码得到编译,但捕获到 NullPointException异常
【单选题】 关于以下application的说明,正确的是( ) 1. class StaticStuff 2. { 3. static int x=10; 4. static { x+=5;} 5. public static void main(String args[ ]) 6. { 7. System.out.println(“x=” + x); 8. } 9. static { x/=3;} 10. }
①  4行与9行不能通过编译,因为缺少方法名和返回类型
②  9行不能通过编译,因为只能有一个静态初始化器
③  编译通过,执行结果为:x=5
④  编译通过,执行结果为:x=3
【单选题】 编译下面源程序会得到哪些文件( )? class A1{ } class A2{ } public class B{ public static void main(String[] args) { } }
①  只有B.class 文件
②  只有 A1.class 和 A2.class 文件
③  编译不成功
④  A1.class、A2.class 和B.class 文件
【单选题】 运行下面程序时,会产生什么异常?( ) public class X7_1_5 { public static void main(String[] args) { int[] z = { 1,2,3,4 } ; int p = z[4]; int x = 0; int y = 5/x; } }
①  ArithmeticException
②  NumberFormatException
③  ArrayIndexOutOfBoundsException
④  IOException
【单选题】 运行下面程序时,会产生什么异常?( ) public class X7_1_4 { public static void main(String[] args) { int x = 0; int y = 5/x; int[] z = { 1,2,3,4 } ; int p = z[4]; } }
①  ArithmeticException
②  NumberFormatException
③  ArrayIndexOutOfBoundsException
④  IOException
【单选题】 已知有下面类的说明: public class X5_1_1 extends x{ private float f =10.6f; int i=16; static int si=10; public static void main(String[] args) { X5_1_1 x=new } } X5_1_1(); 在 main()方法中,下面哪条语句的用法是正确的?( )
①  x.f
②  this.si
③  X5_1_1.i
④  X5_1_1.f
随机题目
【单选题】 大革命时期,()带领贫苦农民打击土豪劣绅,赢得贫苦人民的爱戴,被群众亲切地称为“谢青天”。
①  李妙斋
②  谢子长
③  习仲勋
④  刘志丹
【单选题】 ()问题是国家文化发展的底线问题。
①  资金
②  人才
③  发展
④  安全
【单选题】 ()的发明,是人类进人新石器时代的重要标志。
①  陶器
②  瓷器
③  玉器
④  青铜器
【单选题】 ()是迄今世界上罕见的规模庞大的陶制雕塑群。
①  秦始皇陵兵马俑
②  铜炉
③  铜灯
④  瓦当
【单选题】 “琮”是一种内圆外方的筒形(),是中国古代重要礼器之一。
①  漆器
②  木雕
③  玉器
④  金属工艺
【单选题】 四川广汉三星堆出土的具象造型是()。
①  象尊
②  立人像、跪人像和人面像等仿生性的具象造型
③  羊尊
④  鹑尊
【单选题】 宽带纹属于()。
①  早期陶器图案
②  中期彩陶图案
③  齐家文化
④  辛店文化
【单选题】 ()是当前文化数据库建设首要解决的问题。
①  按照统一标准关联零散的文化资源数据
②  丰富并增强文化基因的当代表达与认同
③  建设国家文化大数据体系
④  构建一体化算力服务体系
【单选题】 ()建设是社会主义现代化建设远景目标最基础、最根本,甚至是核心的总体战略诉求。
①  文化强国
②  教育强国
③  人才强国
④  体育强国
【单选题】 ()是战国时期出现的青铜器纹样,也是当时流行于封建社会上层羽化登仙思想意识及风尚的形象化反映。
①  云纹
②  鳞纹
③  蟠螭纹
④  人物纹