Java 5 & 6 Reference Card
Questions and Answers
This page captures some of the feedback and questions concerning my
Java Reference Card.
I hope it proves helpful...
Stylistic Issues
- Q: Wouldn't the sheet be improved by adding more concrete examples,
e.g. of a for loop: for (int i = 0; i < 10; i++) System.out.println(i);
even if this means sacrificing some content or moving to multiple sheets?
Additional material could be provided online if necessary, but examples on
the sheet itself would be helpful.
A: I'll think about this and see if I can squeeze more examples in.
Part of my original motivation was to produce a free-standing summary
that could be studied by students while they are travelling (hence the
goal of a single piece of paper). If time permits, I will try to add
additional supplementary detail.
Java Details
- Q: Your sheet says a boolean is 1 bit, but there is no specification of how big a boolean is.
A: The size of a boolean is indeed not specified,
however a boolean holds 1 bit of information.
There is some ambiguity over the "bits" column,
since it isn't clear whether this indicates the
size or the informational capacity.
Until I can find a better way to express
this distinction I'm minded to leave
the column heading as "bits".
There is a hint that this column does not indicate
the storage requirement, since I use the infinity symbol to indicate
that BigInteger and BigDecimal are unbounded (for all practical
intents and purposes) in their ability to represent large values.
Feedback:
Any constructive feedback should be sent to: JavaRefCard @ dcs.gla.ac.uk
which has a fairly strong spam filter.
Dr Peter Dickman