题目

ClassOne.java   package com.abc.pkg1;   public class ClassOne {   private char var = ‘a‘;   char getVar() {return var;}   }   ClassTest.java   package com.abc.pkg2;   import com.abc.pkg1.ClassOne;   public class ClassTest extends ClassOne {  public static void main(Stringargs) {  char a = new ClassOne().getVar();  char b = new ClassTest().getVar();   }   }   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.

提示:未搜索到的试题可在搜索页快速提交,您可在会员中心"提交的题"快速查看答案。
答案
查看答案
相关试题

You have been asked to use a 25 bit subnet mask to segment the following network block: 209.18.12.0. How many usable will there be per subnet?()

A、2 hosts

B、120 hosts

C、126 hosts

D、255 hosts

心脏毒性最强的是()

A、环磷酰胺

B、柔红霉素

C、甲氨蝶呤

D、长春新碱

E、全反式维甲酸

public class Person {  private String name, comment;  private int age;  public Person(String n, int a, String c) {  name = n; age = a; comment = c;  }  public boolean equals(Object o) {  if(! (o instanceof Person)) return false;  Person p = (Person)o;  return age == p.age && name.equals(p.name);  }  }  What is the appropriate definition of the hashCode method in class Person?() 

A、 return super.hashCode();

B、 return name.hashCode() + age * 7;

C、 return name.hashCode() + comment.hashCode() /2;

D、 return name.hashCode() + comment.hashCode() / 2 - age * 3;

交接箱(间)必须设置地线,接地电阻可以是()。

A、5欧姆

B、10欧姆

C、15欧姆

D、20欧姆

如果一个顾客抱怨应用程序在屏幕上面显示界面太小以至于很难看清楚,工程师该如何设置视频?()

A、降低屏幕的像素个数

B、增加硬件的图形处理速度

C、增加显示器的水平分辨率

D、降低显示器的垂直分辨率

联系我们 会员中心
返回顶部