Some code write in parallel ways by JAVA