Java Wiki
(Create page.)
Tag: Visual edit
 
(Move syntax description into separate section.)
Tag: Visual edit
Line 1: Line 1:
A [[class]] may be thought of as the blueprints to a building, schematics to a device, recipe to meals, or even cookie cutters to sugar cookies. The basic syntax of a class requires the keyword [[class]], the name of the class, and a class body.
+
A [[class]] may be thought of as the blueprints to a building, schematics to a device, recipe to meals, or even cookie cutters to sugar cookies.
  +
[[Category:Tutorials]]
+
== Syntax[[Category:Tutorials]] ==
  +
The basic syntax of a class requires the keyword [[Keyword#class|class]], the name of the class, and a class body. A class body contains class members.
  +
class Foo {
  +
// class members
  +
}
  +
For a more concrete example,
  +
class Printer {
  +
  +
}

Revision as of 21:05, 21 October 2014

A class may be thought of as the blueprints to a building, schematics to a device, recipe to meals, or even cookie cutters to sugar cookies.

Syntax

The basic syntax of a class requires the keyword class, the name of the class, and a class body. A class body contains class members.

class Foo {
    // class members
}

For a more concrete example,

class Printer {
    
}