Classes & OOP interview questions

15 Classes & OOP questions from the Kotlin bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

1. What is Data class?

Junior
  1. A.a language construct that defines a singleton, creating one instance lazily on first access
  2. B.a class declared so the compiler generates equals, hashCode, toString, and copy from its primary constructor properties
  3. C.an object tied to a class that holds members callable through the class name itself, replacing static members
  4. D.a keyword that permits a class or member to be inherited or overridden, which is forbidden by default

Answer + AI explanation with Pro

2. Which term means: "a class declared so the compiler generates equals, hashCode, toString, and copy from its primary constructor properties"?

Junior
  1. A.Sealed class
  2. B.Data class
  3. C.Object declaration
  4. D.open modifier

Answer + AI explanation with Pro

3. Which statement is correct?

Junior
  1. A.Data class — a restricted hierarchy whose direct subclasses are all known at compile time, enabling exhaustive branching
  2. B.Data class — a class declared so the compiler generates equals, hashCode, toString, and copy from its primary constructor properties
  3. C.Data class — a keyword that permits a class or member to be inherited or overridden, which is forbidden by default
  4. D.Data class — a language construct that defines a singleton, creating one instance lazily on first access

Answer + AI explanation with Pro

4. What is Sealed class?

Mid
  1. A.a keyword that permits a class or member to be inherited or overridden, which is forbidden by default
  2. B.a restricted hierarchy whose direct subclasses are all known at compile time, enabling exhaustive branching
  3. C.an object tied to a class that holds members callable through the class name itself, replacing static members
  4. D.a class declared so the compiler generates equals, hashCode, toString, and copy from its primary constructor properties

Answer + AI explanation with Pro

5. Which term means: "a restricted hierarchy whose direct subclasses are all known at compile time, enabling exhaustive branching"?

Mid
  1. A.Data class
  2. B.open modifier
  3. C.Companion object
  4. D.Sealed class

Answer + AI explanation with Pro

6. Which statement is correct?

Mid
  1. A.Sealed class — a language construct that defines a singleton, creating one instance lazily on first access
  2. B.Sealed class — a restricted hierarchy whose direct subclasses are all known at compile time, enabling exhaustive branching
  3. C.Sealed class — a class declared so the compiler generates equals, hashCode, toString, and copy from its primary constructor properties
  4. D.Sealed class — a keyword that permits a class or member to be inherited or overridden, which is forbidden by default

Answer + AI explanation with Pro

7. What is Object declaration?

Mid
  1. A.a class declared so the compiler generates equals, hashCode, toString, and copy from its primary constructor properties
  2. B.an object tied to a class that holds members callable through the class name itself, replacing static members
  3. C.a language construct that defines a singleton, creating one instance lazily on first access
  4. D.a restricted hierarchy whose direct subclasses are all known at compile time, enabling exhaustive branching

Answer + AI explanation with Pro

8. Which term means: "a language construct that defines a singleton, creating one instance lazily on first access"?

Mid
  1. A.Sealed class
  2. B.Companion object
  3. C.Object declaration
  4. D.Data class

Answer + AI explanation with Pro

9. Which statement is correct?

Mid
  1. A.Object declaration — a restricted hierarchy whose direct subclasses are all known at compile time, enabling exhaustive branching
  2. B.Object declaration — an object tied to a class that holds members callable through the class name itself, replacing static members
  3. C.Object declaration — a language construct that defines a singleton, creating one instance lazily on first access
  4. D.Object declaration — a class declared so the compiler generates equals, hashCode, toString, and copy from its primary constructor properties

Answer + AI explanation with Pro

10. What is Companion object?

Mid
  1. A.a restricted hierarchy whose direct subclasses are all known at compile time, enabling exhaustive branching
  2. B.a keyword that permits a class or member to be inherited or overridden, which is forbidden by default
  3. C.an object tied to a class that holds members callable through the class name itself, replacing static members
  4. D.a language construct that defines a singleton, creating one instance lazily on first access

Answer + AI explanation with Pro

11. Which term means: "an object tied to a class that holds members callable through the class name itself, replacing static members"?

Mid
  1. A.Companion object
  2. B.Data class
  3. C.Sealed class
  4. D.Object declaration

Answer + AI explanation with Pro

12. Which statement is correct?

Mid
  1. A.Companion object — an object tied to a class that holds members callable through the class name itself, replacing static members
  2. B.Companion object — a keyword that permits a class or member to be inherited or overridden, which is forbidden by default
  3. C.Companion object — a language construct that defines a singleton, creating one instance lazily on first access
  4. D.Companion object — a class declared so the compiler generates equals, hashCode, toString, and copy from its primary constructor properties

Answer + AI explanation with Pro

13. What is open modifier?

Junior
  1. A.a class declared so the compiler generates equals, hashCode, toString, and copy from its primary constructor properties
  2. B.a keyword that permits a class or member to be inherited or overridden, which is forbidden by default
  3. C.a restricted hierarchy whose direct subclasses are all known at compile time, enabling exhaustive branching
  4. D.an object tied to a class that holds members callable through the class name itself, replacing static members

Answer + AI explanation with Pro

14. Which term means: "a keyword that permits a class or member to be inherited or overridden, which is forbidden by default"?

Junior
  1. A.open modifier
  2. B.Data class
  3. C.Companion object
  4. D.Object declaration

Answer + AI explanation with Pro

15. Which statement is correct?

Junior
  1. A.open modifier — a restricted hierarchy whose direct subclasses are all known at compile time, enabling exhaustive branching
  2. B.open modifier — an object tied to a class that holds members callable through the class name itself, replacing static members
  3. C.open modifier — a language construct that defines a singleton, creating one instance lazily on first access
  4. D.open modifier — a keyword that permits a class or member to be inherited or overridden, which is forbidden by default

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Classes & OOP question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers