Clarifications to Java example code