an example of java multithread programming.