Monday, March 23, 2009

Java Variables

Declaring Variables is a short tutorial instructing Java programmers on how to use variables. When introduced into a program variables must be declared with one of eight primitive data types. The data type preceeds the name of the variable. For example:

float pi

Pi could then be assigned a value:

pi = 3.14

The assignment of a value is known as initializing a variable. The name of the variable is known as the identifier. Variables must be declared i.e. identified and initialized prior to being used.

Labels:

0 Comments:

Post a Comment

<< Home