in Object Oriented Programming retagged by
6,442 views
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
by
6.4k views

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.

Answer:

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