Database-Management-System
October 11, 2023
KVS 22-12-2018 Part-A
October 11, 2023
Database-Management-System
October 11, 2023
KVS 22-12-2018 Part-A
October 11, 2023

OOPS

Question 85
Given a class named student, which of the following is a valid constructor declaration for the class?
A
Student student(){}
B
Private final student(){}
C
Student(student s){}
D
Void student(){}
Question 85 Explanation: 
A constructor cannot specify any return type, not even void. A constructor cannot be final, static or abstract.
Correct Answer: C
Question 85 Explanation: 
A constructor cannot specify any return type, not even void. A constructor cannot be final, static or abstract.

Leave a Reply

Your email address will not be published. Required fields are marked *