added several java solution