Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Final class

 
sita raman subra
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the use of Final Class.

Practically where we use it in our application?

Thanks & Reagrds,
Sitaraman
[ January 07, 2008: Message edited by: David O'Meara ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't shout. Excessive use of capital letters is considered poor etiquette.

thanks,
Dave
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You use it when you don't want a class to be extended.

java.lang.String and the Number classes are final to prevent someone tinkering with them and making them behave in ways that are not expected. Other immutable classes are final to prevent people adding mutable behaviour.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic