Interview Questions - Core Java

89.
If a class is declared without any access modifiers, where may the class be accessed?
A class that is declared without any access modifiers is said to have package access. This means that the class can only be accessed by other classes and interfaces that are defined within the same package.

90.
Does a class inherit the constructors of its superclass?
A class does not inherit constructors from any of its superclasses.

91.
Name the eight primitive Java types.
The eight primitive types are byte, char, short, int, long, float, double, and boolean.

92.
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.