O'Reilly logo

Special Edition Using Java 2 Standard Edition by Geoff Friesen, Chuck Cavaness, Brian Keeton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Declaring a Class

In general, Java class declarations take the form

						AccessSpecifier Modifiers class NewClass extends SuperclassName
  implements InterfaceName
					

where everything in italics is optional. As you can see, there are five properties of the class that can be defined in the declaration:

  • Access Specifier

  • Modifiers

  • Class name

  • Superclass

  • Interfaces implemented

See Chapter 9, "Interfaces,"

Access Specifiers

The access specifier in a class declaration determines how visible a class is to other classes. The specifiers that apply to classes are similar to the method access specifiers discussed in Chapter 4, "Methods and Exceptions." Although specifiers are not of primary importance while developing an individual class, they become very important ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required