java revisited examples