• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Constructor

 
Patrick Punty
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following modifiers can be applied to a constructor?

a. private
b. abstract
c. final
d. volatile
e. native
f. None of the above.

MYAns: a,c

Given Ans:a

But I feel Math class constructors are final.
Well by any chance constructors are final plz let me know.
 
Seb Mathe
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Math constructor is private, not final.

Constructors are not inherited, so they can't be final.
 
Patrick Punty
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Seb
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic