aspose file tools*
The moose likes Beginning Java and the fly likes Why can't we declare Outer classes or Top level classes as final ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Why can Watch "Why can New topic
Author

Why can't we declare Outer classes or Top level classes as final ?

Aashish Vyas
Greenhorn

Joined: May 09, 2012
Posts: 14
hi .. I wanna know that why can't we declare Outer classes as final classes ??

is there any security reason ?

thanks..
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14268
    
  21

What do you mean? You can make a top-level class final, there's no problem with that. Some classes in the standard Java API, such as class java.lang.String, are final top-level classes.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Aashish Vyas
Greenhorn

Joined: May 09, 2012
Posts: 14

Ohh..now I got that..

thanks Jesper..




 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why can't we declare Outer classes or Top level classes as final ?