restructure java code
restructure java code