多选题switch (i)  {  default:  System.out.printIn(“Hello”);  )   What are the two acceptable types for the variable i?()ACharBByteCFloatDDoubleEObject

多选题
switch (i)  {  default:  System.out.printIn(“Hello”);  )   What are the two acceptable types for the variable i?()
A

Char

B

Byte

C

Float

D

Double

E

Object


参考解析

解析: 暂无解析

相关考题:

单选题A class games.cards.Poker is correctly defined in the jar file Poker.jar.  A user wants to execute the main method of Poker on a UNIX system using the command:  java games.cards.Poker  What allows the user to do this?()A put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/javaB put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/java/*.jarC Put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/java/Poker.jarD put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include /stuff/javaE put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include /stuffijava/*.jarF put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include /stuff/java/Poker.jar

单选题It is desirable that a certain method within a certain class can only be accessed by classes that are defined within the same package as the class of the method. How can such restrictions be enforced?()AMark the method with the keyword public.BMark the method with the keyword protected.CMark the method with the keyword private.DMark the method with the keyword package.EDo not mark the method with any accessibility modifiers.

单选题You want a class to have access to members of another class in the same package. Which is the most restrictive access modifier that will accomplish that will accomplish this objective?()A PublicB PrivateC ProtectedD TransientE No access modifier is required.

单选题What will be the result of attempting to run the following program?()   public class Qaa75 {   public static void main(String args[]) {   String[][][] arr = {   { {}, null },   { { "1", "2" }, { "1", null, "3" } },   {},   { { "1", null } }  };   System.out.println(arr.length + arr[1][2].length);   }   }AThe program will terminate with an ArrayIndexOutOfBoundsException.BThe program will terminate with a NullPointerException.C4 will be written to standard output.D6 will be written to standard output.E7 will be written to standard output.

单选题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 {}

多选题Which statements about inheritance are true?()AIn Java programming language only allows single inheritance.BIn Java programming language allows a class to implement only one interface.CIn Java programming language a class cannot extend a class and implement a interface together.DIn Java programming language single inheritance makes code more reliable.

多选题Which two CANNOT directly cause a thread to stop executing? ()ACalling the yield method.BCalling the wait method on an object.CCalling the notify method on an object.DCalling the notifyAll method on an object.ECalling the start method on another Thread object.

单选题When creating a class that associates a set of keys with a set of values, which of these interfaces is most applicable?()ACollectionBSetCSortedSetDMap

单选题public class ClassA {  public int getValue() {  int value=0;  boolean setting = true;  String title=”Hello”;  (value || (setting  title == “Hello”)) { return 1; }  (value == 1  title.equals(”Hello”)) { return 2; }  }  } And:  ClassA a = new ClassA();  a.getValue();  What is the result?()A 1B 2C Compilation fails.D The code runs with no output.E An exception is thrown at runtime.