Thinking in Java code