Declarations Within a Class


Inside a class, methods and attributes are declared.

Method declarations are basically the same as for C functions with the addition of the following optional modifiers:

   public            protected         private           final       
   static            synchronizable    native

Attribute declarations (c.f. C variables) can have the following optional modifiers:

   public            protected         private           final
   static