finish last java sample