Java Programming II: working with the Activity Cycle