Show Menu
Cheatography

Java Cheat Sheet (DRAFT) by

Java programming Language for advanced programmers

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Variables

final
variables
readonly
int x, y, z; x = y = z = 50;
same value to multiple variables

Primitive Data types

Integer Types
byte
(1 byte),
Short
(2 bytes),
Int
(4 bytes),
long
(8 bytes, should end the value with an L))
Floating Point Types
float
,
double
(should end with
f
and
d
resp)
Scientific Numbers
e
to indicate
boolean
true, false
Characters
97 (ASCII value) or 'A'
String
"­Hello World"