JMU
Literals
An Introduction with Examples in Java


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu


Review
Literals
Some Literals in Java

Type Example
byte N/A
short N/A
int 83
long 83L
float 2.9f
double 2.9
char 'd'
boolean true

Numeric Literals
Character Literals
Java vs. Python - Important Differences