The moose likes Beginning Java and the fly likes static inner class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "static inner class" Watch "static inner class" New topic

static inner class

hari harann
Ranch Hand

Joined: Aug 07, 2008
Posts: 54
when we declare the inner class as static it turns it into a static nested class not an inner class.. is the statement right?? explain me please.. Thanks in advance
Mark Vedder
Ranch Hand

Joined: Dec 17, 2003
Posts: 624

It's a terminology thing. From the Sun Java Tutorial on nested classes:

Terminology: Nested classes are divided into two categories: static and non-static. Nested classes that are declared static are simply called static nested classes. Non-static nested classes are called inner classes.

Take a look at the page for more info. Also see the tutorial page on inner classes. Lastly, you can look at the Java Glossary's page on nested classes
[ August 07, 2008: Message edited by: Mark Vedder ]
I agree. Here's the link: http://aspose.com/file-tools
subject: static inner class
Similar Threads
is inner class can be static . what is the purpose of inner class ??
Top-level classes
doubt on Inner class
Question about static class
no static method in inner class - why ?