Homework for January 24th and 25th
Review notes and
code from Lecture 4 – January 20th
Read page 135 in
our text about the printf method and look at the java API (java documentation)
about the method.
Look at Appendix M
for the predefined constants associated with
wrapper classes for the numeric primitive types and determine how to
find out what they are (write a bit of code).
Integer - page 819
Float – page 795
Byte – page 755
Short – page 865
Long - page 847
Double – page 789
Review ProductCodes.java and understand the code well enough to be
able to answer
questions about String code such as
which position in the String array code is
referred to by: code.charAt(9) ?
which positions in the String array code
are being referenced by: code.substring
(3,7) ?
why must we say code.equals("XXX") and not code == "XXX" ?
what would be better variable names than
banned and valid? Why?