Java Interview Questions

Q61. Constructors have the same name as the ________
(a) Class
(b) Int
(c) Void
(d) String

Q62. Method __________ has same name but different parameter list and different definition
(a) Binding
(b) Overriding
(c) Overloading
(d) Polymorphism

Q63. Polymorphism in Java is of two tytpes, namely ________ and _______
(a) Static type, Dynamic type
(b) Start time, End time
(c) Run time, Compile time
(d) Variable type, Static type

Q64. Runtime polymorphism is also known as _______
(a) Static binding
(b) Early binding
(c) Dynamic method dispatch
(d) Method overloading

Q65. When reference variable of Parent class refers to the object of Child class, then it is known as
(a) Side casting
(b) Upcasting
(c) Top casting
(d) Downcasting

Q66. Polymorphism that is resolved during compiler time is known as
(a) Dynamic polymorphism
(b) Static polymorphism
(c) Special Polymorphism
(d) None of the above

Q67. Which one of the followings is false for static method
(a) They can only call other static methods
(b) They can only access static data
(c) They can only access static data
(d) They can only access dynamic data

Q68. In inheritance, the old class is known as
(a) Start class
(b) Base class
(c) Derived class
(d) Sub class

Q69. Base class is also known as
(a) Super class
(b) Child class
(c) Sub class
(d) Derived class

Q70. When a class extends a class, which extends another class then this is called ______ inheritance
(a) Single level
(b) Two level
(c) Multi level
(d) Many level

Q71. When more than one child classes have the same parent class then it is called as
(a) Single inheritance
(b) Multilevel inheritance
(c) Class inheritance
(d) Hierarchical inheritance

Q72. A class that cannot be subclassed is called a _______
(a) Parent class
(b) Child class
(c) Revised class
(d) Final class

Q73. Class Subclass-name extends Superclass-name

{

//methods and fields

}

This syntax is used for
(a) Inheritance
(b) Polymorphism
(c) Encaptulation
(d) All of the above

Q74. _________ classes cannot be instantiated
(a) String
(b) Mutable
(c) Wrapper
(d) Abstract

Q75. ______ is a process of hiding the implementation details and showing only functionality to the user
(a) Abstract
(b) Network
(c) System
(d) Anonymous


1 2 3 4 5 6 7 8