in Object Oriented Programming retagged by
0 votes
0 votes

Given a class named student, which of the following is a valid constructor declaration for the class?

  1. Student student(){}
  2. Private final student(){}
  3. Student(student s){}
  4. Void student(){}
in Object Oriented Programming retagged by

1 Answer

0 votes
0 votes

 answer (C)  

A constructor cannot specify any return type, not even void. A constructor cannot be final, static or abstract.


Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true