Which of the following can be used in a switch statement in the expression after keyword case?
A. a constant integral expression.
B. a character constant.
C. a String
D. an enumeration constant.
a. A and B.
b. A and C.
c. B and C.
d. All.
d. All.
You might also like to view...
The difference between an accumulator and a counter lies in the ____ that you add to the variable.
A. comments B. updates C. value D. text
public abstract class Car { private String model; public abstract void color(); public String getName() { return model; } public void setName(String carModel) { model = carModel; } } ? ? Using the code above, would it be possible to create a class in which you declare a Car object with the statement Car myCar = new Car("Honda");? Explain why or why not.
What will be an ideal response?