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

public class Foo {  private int val;  public foo(int v) (val = v;)  }  public static void main (String [] args)  {  Foo a = new Foo (10);  Foo b = new Foo (10);  Foo c = a;  int d = 10;  double e = 10.0;  }  Which three logical expression evaluate to true?()

A

 (a ==c)

B

 (d ==e)

C

 (b ==d)

D

 (a ==b)

E

 (b ==c)

F

 (d ==10.0)

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

相关问题推荐

  • Which interface does java.util.Hashable implement?()  

    A、 Java.util.Map.

    B、 Java.util.List.

    C、 Java.util.Hashable.

    D、 Java.util.Collection.

  • public class test {  public static void add3 (Integer i)  int val = i.intValue ( );  val += 3;  i = new Integer (val);  } public static void main (String args [ ] )  {  Integer  i = new Integer (0);  add3 (i);  system.out.printIn (i.intValue ( )  );  } What is the result?()  

    A、 Compilation will fail.

    B、 The program prints “0”.

    C、 The program prints “3”.

    D、 Compilation will succeed but an exception will be thrown at line 3.

  • Which two demonstrate an “is a” relationship? ()

    A

     public interface Person{}  public class Employee extends Person{}

    B

     public interface Shape{}  public class Employee extends Shape{}

    C

     public interface Color{}  public class Employee extends Color{}

    D

     public class Species{}  public class Animal (private Species species;)

    E

     interface Component{}  Class Container implements Component (  Private Component[ ] children;  )

  • Which two construct an OutputSream that appends to the file “file.txt”? ()

    A

     OutputStream out=new FileOutputStream(“file.txt”);

    B

     OutputStream out=new FileOutputStream(“file.txt”, “append”);

    C

     FileOutputStream out=new FileOutputStream(“file.txt”, true);

    D

     FileOutputStream out=new FileOutputStream(new file(“file.txt”));

    E

     OutputStream out=new FileOutputStream(new File(“file.txt”)true);

  • class ClassA {}  class ClassB extends ClassA {}  class ClassC extends ClassA {}  and:  ClassA p0 = new ClassA();  ClassB p1 = new ClassB();  ClassC p2 = new ClassC();  ClassA p3 = new ClassB();  ClassA p4 = new ClassC();  Which three are valid?()

    A

     p0 = p1;

    B

     p1 =p2;

    C

     p2 = p4;

    D

     p2 = (ClassC)p1;

    E

     p1 = (ClassB)p3;

    F

     p2 = (ClassC)p4;

联系客服 会员中心
TOP