Java Code samples