11.) Which of the following statements about constructors is incorrect?
A) Constructors can be inherited by subclasses.
B) Constructors can have access modifiers.
C) Constructors can have parameters.
D) Constructors can be marked as “static.”
12.) In Java, what is the purpose of a parameterized constructor?
A) To create multiple constructors with the same parameters.
B) To accept arguments and initialize object attributes.
C) To prevent the instantiation of a class.
D) To allow only private access to the constructor.
13.) Which of the following statements regarding constructors is true?
A) A class can have multiple constructors with the same number and type of parameters.
B) Constructors can be defined as abstract methods.
C) Constructors can return values..
D) Constructors can have a different name than the class.
14.) Which of the following is true about the order of constructor invocation during object creation in Java?
A) Subclass constructors are invoked before superclass constructors.
B) Constructors of all classes are invoked simultaneously.
C) Superclass constructors are invoked before subclass constructors.
D) Constructor invocation order is random.
15.) What happens if a constructor does not explicitly call a constructor using the this() or super() keywords?
A) An error occurs, and the program does not compile.
B) The constructor automatically calls the default constructor.
C) The compiler generates a call to the parameterless constructor.
D) The constructor remains uninitialized.
16.) In Java, can a constructor be marked as both “static” and “final”?
A) Yes, to prevent the constructor from being overridden.
B) Yes, to ensure the constructor is accessible without object creation.
C) No, “static” and “final” modifiers cannot be applied together to a constructor.
D) No, constructors cannot have access modifiers.
17.) In Java, can a constructor call itself recursively using the this() keyword?
A) Yes, it is a common practice for constructor initialization.
B) Yes, but only if the constructor is marked as “private.”
C) No, recursive constructor calls using this() are not allowed.
D) No, constructors cannot use this() keyword.
18.) Which of the following statements is true regarding the use of this() and super() together in a constructor?
A) Both this() and super() can be used together in any constructor.
B) Only this() can be used to call another constructor within the same class.
C) Only super() can be used to call a constructor of the superclass.
D) Using both this() and super() together causes a compilation error.
19.) Which of the following is not a valid use of constructors in Java?
A) Initializing instance variables
B) Allocating memory for an object
C) Creating multiple instances of a class
D) Implementing interface methods