Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin


Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What other modifiers other than static and accessibility modifiers is permissible for inner classes.
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Lakshmi,
From the JLS Spec:

2.8.2 Class Modifiers
A class declaration may include class modifiers. A class may be declared public, as discussed in �2.7.4.
An abstract class is a class that is incomplete, or considered incomplete. Only abstract classes may have abstract methods (�2.10.3),that is, methods that are declared but not yet implemented.
A class can be declared final if its definition is complete and no subclasses are desired or required. Because a final class never has any subclasses, the methods of a final class cannot be overridden in a subclass. A class cannot be both final and abstract, because the implementation of such a class could never be completed.
A class can be declared strictfp to indicate that all expressions in the methods of the class are FP-strict (�2.18), whether or not the methods themselves are declared FP-strict.
A class is declared public to make its type available to packages other than the one in which it is declared. A public class is accessible from other packages, using either its fully qualified name or a shorter name created by an import declaration (�2.7.2), whenever the host permits access to its package. If a class lacks the public modifier, access to the class declaration is limited to the package in which it is

Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you can also use "final".Also confirm if you could "synchronize" an inner class.I think you can!
Sun Certified Programmer for Java 2 Platform Scored 93%
Oracle Certified Solution Developer - JDeveloper
-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
-- Object-Oriented Analysis and Design with UML Scored 73%
Oracle Certified Enterprise Developer - Oracle Internet Platform
-- Enterprise Connectivity with J2EE Scored 72%
-- Enterprise Development on the Oracle Internet Platform Scored 44 out of 56
[This message has been edited by Desai Sandeep (edited July 19, 2001).]
In the renaissance, how big were the dinosaurs? Did you have tiny ads?
We need your help - Coderanch server fundraiser
    Bookmark Topic Watch Topic
  • New Topic