1. A constructor is similar to a method (but not actually a method) that is _____________ when an object is instantiated.
2. Here, Test() has same name as that of the class. However, it has a return type void. Hence, it?s a method NOT a constructor.
3. How do you initialize inherited private variables if you do not have direct access to them in the subclass?
4. In Java, the superclass constructor can be called from the_____________by using the keyword super and passing appropriate parameters, for example super(); or super(theName); as in the code below.
5. If a subclass has no call to a superclass constructor using super as the first line in a subclass constructor then the compiler will automatically add a super() call as the first line in a constructor.
6. What is the output of the following code?
7. The actual parameters passed in the call to the _______________provide values that the constructor can use to initialize the object's instance variables
8. Refer to the following example: What is the output?
9. The superclass constructor can be called explicitly using the super keyword, but it should be ______ statement in a constructor.
10. In inheritance, the objects are constructed __________________.
11. Recap: Constructors do not actually construct the object. The class makes the object and then executes a constructor to ______________________________________.
12. Recap: Constructors are specified after the fields and before any methods. They typically start with _____________________________.
13. What is the output of the following code?
14. Constructors cannot be abstract or static or final.
15. Constructors in Java can be overridden. In other words, constructors can be inherited.
16. The super keyword refers to the superclass, immediately above of the calling class in the hierarchy.
17. The use of multiple super keywords to access an ancestor class other than the direct parent is not permitted.
18. A constructor cannot be overloaded.
19. A Java constructor name must exactly match with the class name (including case).
20. A Java constructor must not have a return type.