Java认证考试综合练习

单选题1. interface Animal {   2. void eat();   3. }   4.   5. // insert code here   6.   7. public class HouseCat implements Feline {   8. public void eat() { }   9. }   和以下三个接口声明:   interface Feline extends Animal { }   interface Feline extends Animal { voi

题目
单选题
1. interface Animal {   2. void eat();   3. }   4.   5. // insert code here   6.   7. public class HouseCat implements Feline {   8. public void eat() { }   9. }   和以下三个接口声明:   interface Feline extends Animal { }   interface Feline extends Animal { void eat(); }   interface Feline extends Animal { void eat() { } }   分别插入到第 5 行,有多少行可以编译?()
A

0

B

1

C

2

D

3

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

1. public class Target {  2. private int i = 0;  3. public int addOne() {  4. return ++i;  5. }  6. }  And:  1. public class Client {  2. public static void main(String[] args) {  3. System.out.println(new Target().addOne());  4. }  5. }  Which change can you make to Target without affecting Client?() 

  • A、 Line 4 of class Target can be changed to return i++;
  • B、 Line 2 of class Target can be changed to private int i = 1;
  • C、 Line 3 of class Target can be changed to private int addOne() {
  • D、 Line 2 of class Target can be changed to private Integer i = 0;

正确答案:D

第2题:

1. public class Test {   2. public static void main (String args) {   3. unsigned byte b = 0;   4. b--;   5.   6. }   7. }   What is the value of b at line 5?()  

  • A、 -1
  • B、 255
  • C、 127
  • D、 Compilation will fail.
  • E、 Compilation will succeed but the program will throw an exception at line 4.

正确答案:D

第3题:

受压容器安全附件是:1.();2.();3.();4.();5.();6.();7.()


答案:安全阀、压力表、防爆膜、温度计、放空阀、泄压阀、进、出口切断阀

第4题:

观赏植物根据观赏部位分类可分为1.()2.()3.()4.()5.().


正确答案:观花类、观叶类、观茎类、观果类、观芽类

第5题:

常见的网上购物流程是()。

  • A、1.查找商品>2.提交订单>3.放入购物车>4.查看订单状态>5.收货确认
  • B、1.查找商品>2.提交订单>3.查看订单状态>4.放入购物车>5.收货确认
  • C、1.查找商品>2.放入购物车>3.提交订单>4.查看订单状态>5.收货确认
  • D、1.查找商品>2.放入购物车>3.提交订单>4.收货确认>5.查看订单状态

正确答案:C

第6题:

1. public interface A {  2. public void doSomething(String thing);  3. }  1. public class AImpl implements A {  2. public void doSomething(String msg) { }  3. }  1. public class B {  2. public A doit() {  3. // more code here  4. }  5.  6. public String execute() { 7. // more code here  8. }  9. }  1. public class C extends B {  2. public AImpl doit() {  3. // more code here  4. }  5.  6. public Object execute() {  7. // more code here  8. }  9. }  Which statement is true about the classes and interfaces in the exhibit?() 

  • A、 Compilation will succeed for all classes and interfaces.
  • B、 Compilation of class C will fail because of an error in line 2.
  • C、 Compilation of class C will fail because of an error in line 6.
  • D、 Compilation of class AImpl will fail because of an error in line 2.

正确答案:C

第7题:

1. public class A {  2. void A() {  3. System.out.println(“Class A”);  4. }  5. public static void main(String[] args) {  6. new A();  7. }  8. }  What is the result?()  

  • A、 Class A
  • B、 Compilation fails.
  • C、 An exception is thrown at line 2.
  • D、 An exception is thrown at line 6.
  • E、 The code executes with no output.

正确答案:E

第8题:

烟叶成熟的特征从哪几方面判断:1.()、2.()、3.()、4.()、5.()、6.()


正确答案:叶色变浅;主脉变白发亮;茸毛脱落;叶基部产生分层;烟叶与主脉支撑能力减弱;叶片出现斑,叶面起皱

第9题:

分析下列汉字音节结构。 1.摆 2.皇 3.卫 4.惘 5.情


正确答案: 1、摆声母是b韵腹是a声调的调类是上升,调值是214。
2、皇声母是h韵头是u,韵腹是a,声调的调类是阳平,调值是35。
3、卫韵头是u,韵腹是e,声调的调类是去声,调值是51。
4、惘韵头是u,韵腹是a,声调的调类是上升,调值是214。
5、情声母是q,韵腹是I,声调的调类是阳平,调值是35。

第10题:

露地观赏植物可分1.()2.()3.()4.()5.().


正确答案:一年生花卉、二年生花卉、多年生花卉、水生花卉、岩生花卉

更多相关问题