Java Sample Program (3)