Interview Questions - Core Java
69.
What restrictions are placed on method overloading?
Two methods may not have the same name and argument list but different return types.
70.
What is casting?
There are two types of casting, casting between primitive numeric types and casting between object references. Casting between numeric types is used to convert larger values, such as double values, to smaller values, such as byte values. Casting between object references is used to refer to an object by a compatible class, interface, or array type reference.
71.
What is the return type of a program's main() method?
void.
72.
If a variable is declared as private, where may the variable be accessed?
A private variable may only be accessed within the class in which it is declared.
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers