Java Code Sample