Java core : multithreading finish