Classes and Objects – Multiple Choice Questions (MCQs)
-
-
2. What is an object in Java?
-
3. Which keyword is used to define a class in Java?
-
4. What is the process of creating an object from a class called?
-
5. Which keyword is used to create an object in Java?
-
6. What is a constructor in Java?
-
7. Can a class have multiple constructors in Java?
-
8. What is constructor overloading in Java?
-
9. What is the default constructor in Java?
-
10. What is the purpose of the `this` keyword in Java?
-
11. How can `this` be used within a constructor?
-
12. What are instance variables (or fields)?