Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

constructor !!! a doubt

 
vaibhav srivastava
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all..
can anyone please help me in understanding y a constructor cant be made final or abstract ?
thanks in advance.
 
Deepak Chopra
Ranch Hand
Posts: 433
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By Default, we can not OVERRIDE a constructor..think about final.

Why we use final ?:

When we don't want a particular thing to be Overridden..and we know that we can not override constructor..!! so there is no need to mention that..!!

Why we use abstract? :

Abstract is forcefully Override, Again if something can not be overridden that means it can not be abstract..

Final conclusion you can say that..constructors are implicitly final.
 
vaibhav srivastava
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot sunny...
I got it !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic