易搜题 > 资格证大类 > 计算机编程 > 问题详情
问题详情

What produces a compiler error?()  

A、 class A { public A(int x) {} }

B、 class A {} class B extends A { B() {} }

C、 class A { A() {} } class B { public B() {} }

D、 class Z { public Z(int) {} } class A extends Z {}

未找到的试题在搜索页框底部可快速提交,在会员中心"提交的题"查看可解决状态。 收藏该题
查看答案

相关问题推荐

  • public class ItemTest {  private final mt id;  public ItemTest(int id) { this.id = id; }  public void updateId(int newId) { id = newId; }  public static void main(String[] args) {  ItemTest fa = new ItemTest(42);  fa.updateId(69);  System.out.println(fa.id);  }  }  What is the result?() 

    A、 Compilation fails.

    B、 An exception is thrown at runtime.

    C、 The attribute id in the Item object remains unchanged.

    D、 The attribute id in the Item object is modified to the new value.

    E、 A new Item object is created with the preferred value in the id attribute.

  • public static void main( String[] args ) {  Integer a = new Integer(10);  Integer b = new Integer(10);  Integer c = a;  int d = 10;  double e = 10.0;  }   Which three evaluate to true?()   

    A

     (a == c)

    B

     (d == e)

    C

     (b == d)

    D

     (a == b)

    E

     (b == c)

    F

     (d == 10.0)

  • What is the result?()

    A、 12,4

    B、 The code runs with no output.

    C、 An exception is thrown at runtime.

    D、 Compilation fails because of an error in line 21.

    E、 Compilation fails because of an error in line 22.

    F、 Compilation fails because of an error in line 31.

  • What is the result?()

    A、 A,B,C

    B、 B,C,A

    C、 Compilation fails.

    D、 The code runs with no output

    E、 An exception is thrown at runtime.

  • A programmer is designing a class to encapsulate the information about an inventory item. A JavaBeans component is needed to do this. The Inventoryltem class has private instance variables to store the item information:  10. private int itemId;  11. private String name;  12. private String description;  Which method signature follows the JavaBeans naming standards for modifying the itemld instance variable?() 

    A、 itemID(int itemId)

    B、 update(int itemId)

    C、 setItemId(int itemId)

    D、 mutateItemId(int itemId)

    E、 updateItemID(int itemId)

联系客服 会员中心
TOP