单选题1. package foo; 2.  3. import java.util.Vector; 4.  5. protected class MyVector Vector { 6. init i = 1; 7. public MyVector() { 8. i = 2; 9. } 10. } 11.  12. public class MyNewVector extends MyVector { 13. public MyNewVector() { 14. i = 4; 15. } 16. pub

题目
单选题
1. package foo; 2.  3. import java.util.Vector; 4.  5. protected class MyVector Vector { 6. init i = 1; 7. public MyVector() { 8. i = 2; 9. } 10. } 11.  12. public class MyNewVector extends MyVector { 13. public MyNewVector() { 14. i = 4; 15. } 16. public static void main(String args[]) { 17. MyVector v = new MyNewVector(); 18. } 19. } What is the result?()
A

 Compilation succeeds.

B

 Compilation fails because of an error at line 5.

C

 Compilation fails because of an error at line 6.

D

 Compilation fails because of an error at line 14.

E

 Compilation fails because of an error at line 17.


相似考题
更多“1. package foo; 2.  3. import java.util.Vector; 4.  5. prote”相关问题
  • 第1题:

    3. string foo = “ABCDE”;  4. foo.substring(3);  5. foo.concat(“XYZ”);  6.     Type the value of foo at line 6.()


    正确答案:ABCDE

  • 第2题:

    分析下列汉字音节结构。 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。

  • 第3题:

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


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

  • 第4题:

    实行改革开放必须坚持的四项基本原则是1.()2.()3.()4.()5.()


    正确答案:反对资产阶级自由化;坚持中国共产党的领导;坚持社会主义道路;坚持马列主义毛泽东思想;坚持人民民主专政

  • 第5题:

    ClassOne.java: 1. package com.abe.pkg1; 2. public class ClassOne { 3. private char var = ‘a’; 4. char getVar() { return var; } 5. } ClassTest.java: 1. package com.abe.pkg2; 2. import com.abc.pkg1.ClassOne; 3. public class ClassTest extends ClassOne { 4. public static void main(String[] args) { 5. char a = new ClassOne().getVar();6. char b = new ClassTest().getVar(); 7. } 8. } What is the result?()

    • A、 Compilation fails.
    • B、 Compilation succeeds and no exceptions are thrown.
    • C、 An exception is thrown at line 5 in ClassTest.java.
    • D、 An exception is thrown at line 6 in ClassTest.java.

    正确答案:A

  • 第6题:

    填空题
    汽车冷气机之主件可分:1.()2.()3.()4.()和干燥器5.()开关。

    正确答案: 挥发器,冷凝器,压缩机,储液器,膨胀
    解析: 暂无解析

  • 第7题:

    单选题
    ClassOne.java  1. package com.abc.pkg1;  2. public class ClassOne {  3. private char var = ‘a’;   4. char getVar()  {return var;}  5. }  ClassTest.java    1. package com.abc.pkg2;  2. import com.abc.pkg1.ClassOne;  3. public class ClassTest extends ClassOne {  4.   public static void main(String[]args)  {  5.     char a = new ClassOne().getVar();  6.     char b = new ClassTest().getVar();   7.   }  8. }      What is the result?()
    A

     Compilation will fail.

    B

     Compilation succeeds and no exceptions are thrown.

    C

     Compilation succeeds but an exception is thrown at line 5 in ClassTest.java.

    D

     Compilation succeeds but an exception is thrown at line 6 in ClassTest.java.


    正确答案: C
    解析: 暂无解析

  • 第8题:

    填空题
    更换巷道支架时必须严格执行1.();2.();3.先上后下;4.先近后远;5.()。

    正确答案: 先外后里、先支后拆、先顶后帮
    解析: 暂无解析

  • 第9题:

    单选题
    Given classes defined in two different files:  1. package util;  2. public class BitUtils {  3. private static void process(byte[] b) { }  4. }  1. package app;  2. public class SomeApp {  3. public static void main(String[] args) {  4. byte[] bytes = new byte[256];  5. // insert code here  6. }  7. }  What is required at line 5 in class SomeApp to use the process method of BitUtils?()
    A

     process(bytes);

    B

     BitUtils.process(bytes);

    C

     app.BitUtils.process(bytes);

    D

     util.BitUtils.process(bytes);

    E

     import util.BitUtils. *; process(bytes);

    F

     SomeApp cannot use the process method in BitUtils.


    正确答案: F
    解析: 暂无解析

  • 第10题:

    单选题
    1. package foo; 2.  3. import java.util.Vector; 4.  5. protected class MyVector Vector { 6. init i = 1; 7. public MyVector() { 8. i = 2; 9. } 10. } 11.  12. public class MyNewVector extends MyVector { 13. public MyNewVector() { 14. i = 4; 15. } 16. public static void main(String args[]) { 17. MyVector v = new MyNewVector(); 18. } 19. } What is the result?()
    A

     Compilation succeeds.

    B

     Compilation fails because of an error at line 5.

    C

     Compilation fails because of an error at line 6.

    D

     Compilation fails because of an error at line 14.

    E

     Compilation fails because of an error at line 17.


    正确答案: A
    解析: 暂无解析

  • 第11题:

    单选题
    Given a class Repetition:  1. package utils;  2.  3. public class Repetition {  4. public static String twice(String s) { return s + s; }  5. }  and given another class Demo:  1. // insert code here 2.  3. public class Demo {  4. public static void main(String[] args) {  5. System.out.println(twice(”pizza”));  6. }  7. }  Which code should be inserted at line 1 of Demo.java to compile and run Demo to print“pizzapizza”?()
    A

     import utils.*;

    B

     static import utils.*;

    C

     import utils.Repetition.*;

    D

     static import utils.Repetition. *;

    E

     import utils.Repetition.twice();

    F

     import static utils.Repetition.twice;

    G

     static import utils.Repetition.twice;


    正确答案: B
    解析: 暂无解析

  • 第12题:

    单选题
    Given: 1. 3.${5 + 3 lt 6} 4.${requestScope[’foo’][0] ne 10 div 0} 5. ${10 div 0} What is the result?()
    A

    True true

    B

    False true

    C

    False true 0

    D

    True true Infinity

    E

    False true Infinity


    正确答案: B
    解析: 暂无解析

  • 第13题:

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

    • 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

  • 第14题:

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


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

  • 第15题:

    个人理财目标制定应遵从的步骤是:1.自我评价;2.多方照顾;3.分期制定;4.目标抉择;5.重新评价。


    正确答案:正确

  • 第16题:

    1. class SuperFoo {  2. SuperFoo doStuff(int x) {  3. return new SuperFoo(); 4. }  5. }  6.  7. class Foo extends SuperFoo {  8. //insert code here  9. }   下面哪三项分别插入到第8行,可以编译?()

    • A、int doStuff() { return 42; }
    • B、int doStuff(int x) { return 42; }
    • C、Foo doStuff(int x) { return new Foo(); }
    • D、SuperFoo doStuff(int x) { return new Foo(); }

    正确答案:A,C,D

  • 第17题:

    Given  1.  public class Foo {  2.  public static void main (String [] args) }  3.  try { return;}  4.  finally { Syste.out.printIn (“Finally”);}  5. }  6. }   What is the result( )?

    • A、 The program runs and prints nothing.
    • B、 The program runs and prints “Finally”.
    • C、 The code comiles. But an exception is thrown at runtime.
    • D、 The code will not compile because the catch block is missing.

    正确答案:B

  • 第18题:

    多选题
    1. class SuperFoo {  2. SuperFoo doStuff(int x) {  3. return new SuperFoo(); 4. }  5. }  6.  7. class Foo extends SuperFoo {  8. //insert code here  9. }   下面哪三项分别插入到第8行,可以编译?()
    A

    int doStuff() { return 42; }

    B

    int doStuff(int x) { return 42; }

    C

    Foo doStuff(int x) { return new Foo(); }

    D

    SuperFoo doStuff(int x) { return new Foo(); }


    正确答案: D,C
    解析: 暂无解析

  • 第19题:

    多选题
    现有2 个文件:  1. package x;  2. public class X {  3. public static void doX() { System.out.print("doX "); }  4. }  和:  1. class Find {  2. public static void main(String [] args) {  3. //insert code here  4. }  5. }  哪两行分别插入到类Find 的第3 行将编译并产生输出“doX”? ()
    A

    doX();

    B

    X.doX();

    C

    x.X.doX();

    D

    x.X myX = new x.X(); myX.doX();


    正确答案: B,D
    解析: 暂无解析

  • 第20题:

    单选题
    Given classes defined in two different files:  1. package util;  2. public class BitUtils {  3. public static void process(byte[]) { /* more code here */ }  4. }  1. package app;  2. public class SomeApp {  3. public static void main(String[] args) {  4. byte[] bytes = new byte[256];  5. // insert code here  6. }  7. }  What is required at line 5 in class SomeApp to use the process method of BitUtils?()
    A

     process(bytes);

    B

     BitUtils.process(bytes);

    C

     util.BitUtils.process(bytes);

    D

     SomeApp cannot use methods in BitUtils.

    E

     import util.BitUtils.*; process(bytes);


    正确答案: E
    解析: 暂无解析

  • 第21题:

    填空题
    3. string foo = “ABCDE”;  4. foo.substring(3);   5. foo.concat(“XYZ”);   6.   Type the value of foo at line 6.()

    正确答案: ABCDE
    解析: 暂无解析

  • 第22题:

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

    正确答案: 观花类、观叶类、观茎类、观果类、观芽类
    解析: 暂无解析

  • 第23题:

    填空题
    物候观测应做到:1.定点;2.();3.定时、定年限;4.();5.资料整理。

    正确答案: 定株,定人
    解析: 暂无解析

  • 第24题:

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

    正确答案: 一年生花卉、二年生花卉、多年生花卉、水生花卉、岩生花卉
    解析: 暂无解析