sample program for java course