Java Classes

Classes are an essential part of any Java application or applet. Java is made up of a number of classes that are made available for general use with the help of the Java Development Kit (JDK). Objects are created as instances of a class, and these objects can include all the code of the class. In other words, you can consider a class as a template, and individual objects are created using that template.

Each Java class consists of two parts:

  • Declaration— Java class declarations have the form

    [AccessSpecifier] class  NameOfNewClass [extends NameOfSuperClass]
    [implements NameOfInterface];
    

    where AccessSpecifier determines how the class can be used in development. Several access specifiers are allowed:

    Public/Protected—Public specifies ...

Get e-Commerce Applications Using Oracle8i and Java from Scratch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.