java note controlling execution