Classes & OOP interview questions

15 real Classes & OOP questions from the Kotlin 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 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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

Free to start

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.

Practice Classes & OOP free