previous | start | next

Syntax 2.1: Variable Definition

  typeName variableName = value;
or
 typeName variableName;

Example:

  String greeting = "Hello, Dave!";

Purpose:

To define a new variable of a particular type and optionally supply an initial value

previous | start | next