24 real OOP & Classes questions from the Java bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.
1. What is Class?
Junior
A.the OOP principle of hiding internal state behind private fields and exposing it only through controlled accessor methods
B.the ability for a single method call to dispatch to different implementations at runtime depending on the actual object type
C.a blueprint that defines the fields and methods from which objects are instantiated
D.the mechanism by which a subclass acquires the fields and methods of a superclass using the extends keyword
A.Class — an interface method with a body, introduced in Java 8, that lets new behavior be added to an interface without breaking existing implementers
B.Class — the mechanism by which a subclass acquires the fields and methods of a superclass using the extends keyword
C.Class — a blueprint that defines the fields and methods from which objects are instantiated
D.Class — a fully abstract contract of method signatures that a class implements, supporting multiple inheritance of type since Java allows only single class inheritance
A.the ability for a single method call to dispatch to different implementations at runtime depending on the actual object type
B.the mechanism by which a subclass acquires the fields and methods of a superclass using the extends keyword
C.defining multiple methods with the same name but different parameter lists, resolved by the compiler at compile time
D.a fully abstract contract of method signatures that a class implements, supporting multiple inheritance of type since Java allows only single class inheritance
A.Inheritance — a class declared abstract that cannot be instantiated and may contain unimplemented methods, allowing partial implementation and state for subclasses
B.Inheritance — the mechanism by which a subclass acquires the fields and methods of a superclass using the extends keyword
C.Inheritance — the ability for a single method call to dispatch to different implementations at runtime depending on the actual object type
D.Inheritance — a blueprint that defines the fields and methods from which objects are instantiated
A.a class declared abstract that cannot be instantiated and may contain unimplemented methods, allowing partial implementation and state for subclasses
B.the ability for a single method call to dispatch to different implementations at runtime depending on the actual object type
C.an interface method with a body, introduced in Java 8, that lets new behavior be added to an interface without breaking existing implementers
D.the mechanism by which a subclass acquires the fields and methods of a superclass using the extends keyword
A.Polymorphism — a class declared abstract that cannot be instantiated and may contain unimplemented methods, allowing partial implementation and state for subclasses
B.Polymorphism — the mechanism by which a subclass acquires the fields and methods of a superclass using the extends keyword
C.Polymorphism — a blueprint that defines the fields and methods from which objects are instantiated
D.Polymorphism — the ability for a single method call to dispatch to different implementations at runtime depending on the actual object type
A.a blueprint that defines the fields and methods from which objects are instantiated
B.the mechanism by which a subclass acquires the fields and methods of a superclass using the extends keyword
C.a class declared abstract that cannot be instantiated and may contain unimplemented methods, allowing partial implementation and state for subclasses
D.an interface method with a body, introduced in Java 8, that lets new behavior be added to an interface without breaking existing implementers
11. Which term means: "a class declared abstract that cannot be instantiated and may contain unimplemented methods, allowing partial implementation and state for subclasses"?
A.Abstract class — a class declared abstract that cannot be instantiated and may contain unimplemented methods, allowing partial implementation and state for subclasses
B.Abstract class — the OOP principle of hiding internal state behind private fields and exposing it only through controlled accessor methods
C.Abstract class — the mechanism by which a subclass acquires the fields and methods of a superclass using the extends keyword
D.Abstract class — a fully abstract contract of method signatures that a class implements, supporting multiple inheritance of type since Java allows only single class inheritance
A.a class declared abstract that cannot be instantiated and may contain unimplemented methods, allowing partial implementation and state for subclasses
B.a fully abstract contract of method signatures that a class implements, supporting multiple inheritance of type since Java allows only single class inheritance
C.an interface method with a body, introduced in Java 8, that lets new behavior be added to an interface without breaking existing implementers
D.a blueprint that defines the fields and methods from which objects are instantiated
14. Which term means: "a fully abstract contract of method signatures that a class implements, supporting multiple inheritance of type since Java allows only single class inheritance"?
A.Interface — defining multiple methods with the same name but different parameter lists, resolved by the compiler at compile time
B.Interface — the ability for a single method call to dispatch to different implementations at runtime depending on the actual object type
C.Interface — a fully abstract contract of method signatures that a class implements, supporting multiple inheritance of type since Java allows only single class inheritance
D.Interface — an interface method with a body, introduced in Java 8, that lets new behavior be added to an interface without breaking existing implementers
17. Which term means: "an interface method with a body, introduced in Java 8, that lets new behavior be added to an interface without breaking existing implementers"?
A.Default method — the mechanism by which a subclass acquires the fields and methods of a superclass using the extends keyword
B.Default method — a fully abstract contract of method signatures that a class implements, supporting multiple inheritance of type since Java allows only single class inheritance
C.Default method — a blueprint that defines the fields and methods from which objects are instantiated
D.Default method — an interface method with a body, introduced in Java 8, that lets new behavior be added to an interface without breaking existing implementers
A.defining multiple methods with the same name but different parameter lists, resolved by the compiler at compile time
B.the OOP principle of hiding internal state behind private fields and exposing it only through controlled accessor methods
C.a class declared abstract that cannot be instantiated and may contain unimplemented methods, allowing partial implementation and state for subclasses
D.a fully abstract contract of method signatures that a class implements, supporting multiple inheritance of type since Java allows only single class inheritance
A.Encapsulation — a fully abstract contract of method signatures that a class implements, supporting multiple inheritance of type since Java allows only single class inheritance
B.Encapsulation — the OOP principle of hiding internal state behind private fields and exposing it only through controlled accessor methods
C.Encapsulation — a class declared abstract that cannot be instantiated and may contain unimplemented methods, allowing partial implementation and state for subclasses
D.Encapsulation — a blueprint that defines the fields and methods from which objects are instantiated
A.an interface method with a body, introduced in Java 8, that lets new behavior be added to an interface without breaking existing implementers
B.defining multiple methods with the same name but different parameter lists, resolved by the compiler at compile time
C.the OOP principle of hiding internal state behind private fields and exposing it only through controlled accessor methods
D.a fully abstract contract of method signatures that a class implements, supporting multiple inheritance of type since Java allows only single class inheritance
A.Method overloading — a blueprint that defines the fields and methods from which objects are instantiated
B.Method overloading — a fully abstract contract of method signatures that a class implements, supporting multiple inheritance of type since Java allows only single class inheritance
C.Method overloading — defining multiple methods with the same name but different parameter lists, resolved by the compiler at compile time
D.Method overloading — the mechanism by which a subclass acquires the fields and methods of a superclass using the extends keyword
Answers, AI explanations, and a scored voice mock interview
Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.