- Is “abc” a primitive value? - The String literal “abc” is not a primitive value. It is a String object.
- What restrictions are placed on the values of each case of a switch statement? - During compilation, the values of each case of a switch statement must evaluate to a value that can be promoted to an int value.
- What modifiers may be used with an interface declaration? - An interface may be declared as public or abstract.
- Is a class a subclass of itself? - A class is a subclass of itself.
click java-interview-questions-and-answers-part-1 to see more interview quesions.