Primitive Types Flashcards
1
Q
data types
A
int - 32 bit (signed) holds 2 (pow 31) - 1
char - 16 bits ( UTF -16) 8 bits ( UTF-8)
byte - 8 bits ( signed)
short - 16 bits ( signed)
long - 64 bits ( 2 pow
2
Q
decimal precision
A
to print 6 precision:
System.out.printf(ā%.6f %nā, v);