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

Nielit Scientist-B IT 4-12-2016

Question 1
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 1 Explanation: 
A constructor cannot specify any return type, not even void. A constructor cannot be final, static or abstract.
Correct Answer: C
Question 1 Explanation: 
A constructor cannot specify any return type, not even void. A constructor cannot be final, static or abstract.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!