Variables

Primitive Data Types in Java

Primitive data types are the data types used when declaring variables.


Syntax
dataType variable;

Notes

The primitive data types are: byte, short, long, int, double, float, boolean, char.


Example
int year = 2015;

< Import Package   |   Type Casting >

© 2018 SyntaxDB. All Rights Reserved.