Today we went over the basics of ACSL competitions and Java primitive types.
Java primitive types fall into 3 main categories:
- integer datatypes (byte, short, int, long)
- character datatypes (char)
- floating-point datatypes (float, double)
Lesson notes can be found here:
primitive types HW
HW answers:
5 is an int
'h' is a char
"hi" is a String
true is a boolean
19/10 = 1 because int division floors the result
123/2 = 61 because int division floors the result
10.5/5 = 2.1 because float division