【单选题】【消耗次数:1】
编译下面源程序会得到哪些文件( )? 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 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 X7_1_6 { public static void main(String[] args) { try{ return; } finally{ System.out.println(Finally); } } }
①  程序正常运行,但不输出任何结果
②  程序正常运行,并输出 Finally
③  编译通过,但运行时出现异常
④  因为没有 catch 子句,因此不能通过编译
【单选题】 运行下面程序时,会产生什么异常?( ) 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 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 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 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 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
【单选题】 阅读以下代码: 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异常
【单选题】 已知有下面类的说明: 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
【单选题】 给出下面代码段, 哪行将引起一个编译时错误?( ) 1) public class Test { 2) int n = 0; 3) int m = 0; 4) public Test(int a) { m=a; } 5) public static void main(String arg[]) { 6) Test t1,t2; 7) int j,k; 8) j=3; k=5; 9) t1=new Test(); 10) t2=new Test(k); 11) } 12) }
①  行1
②  行4
③  行6
④  行9
随机题目
【单选题】 关于问卷调查,以下说法不正确的是哪个?
①  填写问卷往往是“背对背”的,可以减少调查对象的思想顾虑,愿意提供真实情况,表达真实观点
②  通常,问卷划分为开放式、封闭式两种
③  问卷必须要有标题,写明本次调查的主题,让被调查者在接到问卷时从标题上就马上知道是调查什么内容的
④  调查的问题提条是调查问卷的核心内容,无论是开放式问卷,还是封闭式问卷,在问题题条体系上的设计都是一样的
【单选题】 关于虚拟企业的构建,以下说法错误的是哪个?
①  在虚拟企业的构建中,既有盟主企业对伙伴的选择,也有伙伴企业对盟主的选择
②  选择伙伴时,唯一重点是要考虑对方所拥有的核心能力和资源
③  成员企业要具有明确的共同目标
④  成员企业协商一致之后要签订书面协议
【单选题】 衡量CIO的业绩,最主要的标准是什么?
①  企业内部管理效率的提高
②  快速反应客户需求
③  参与决策的数量和质量
④  对决策信息提供的系统性
【单选题】 以下哪个步骤是企业竞争情报工作的关键环节?
①  选定目标
②  情报收集
③  分析加工
④  应用传播
【单选题】 登记搜索引擎的数量和排名,这是对企业网站进行测评的哪类指标?
①  网站设计的评价指标
②  网站推广的评价指标
③  网站流量的评价指标
④  网站服务质量的评价指标
【判断题】 通过技术手段保护企业信息的方式有制度式、密码式和技术创新。
①  正确
②  错误
【判断题】 企业决策的的满意化方案难以通过调整企业信息系统的结构来实现。
①  正确
②  错误
【判断题】 信息活动是指只与计算机系统有关的活动。
①  正确
②  错误
【判断题】 客体信息系统决定了系统能达到的最高水平。
①  正确
②  错误
【判断题】 信息资源的获得与开发者无关,其使用价值的实现与使用者有关。
①  正确
②  错误