aspose file tools*
The moose likes Beginning Java and the fly likes class declaration as static Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "class declaration as static " Watch "class declaration as static " New topic
Author

class declaration as static

abhay jain
Ranch Hand

Joined: Jun 03, 2011
Posts: 130
we can not declare a class as static class
1. is that correct ? if yes then why is it so ?
2. is there any exceptional case where a class declared as static

for example the following code gives error on compiling

Vijay Tidake
Ranch Hand

Joined: Nov 04, 2008
Posts: 146

Hi,

you can only declare the inner class as the static class but not the outer class.

Please check this also

Thanks


The important thing is not to stop questioning.Curiosity has its own reason for existing.
abhay jain
Ranch Hand

Joined: Jun 03, 2011
Posts: 130
Thanks a lot my friend
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: class declaration as static