a java code used to test multithread