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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

decimal precision

A

to print 6 precision:

System.out.printf(ā€œ%.6f %nā€, v);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly