Java Variables Declaration and Initialization

Java Variables are used to store values and their values vary during program execution.

Variables Syntax:

type variableName = value;
where
type is the Data Type of the Variable
variableName is the Variable Name
value is the assigned initial value of the Variable

Java has 8 Primitive Data Types, namely int, float, boolean, char, byte, short, long and double.

0 comments:

Post a Comment