Updating java-tutorial to match sample