Identify the modifier which cannot be used for constructors.
Java MCQ: Identify the modifier which cannot be used for constructors. a) private b) protected c) final d) public Answer: c) final Explanation: The final modifier cannot be applied to constructors in Java because constructors are not inherited, and hence, there’s no point in preventing inheritance. Other access modifiers like private, protected, and public can […]
Identify the modifier which cannot be used for constructors. Read More »