add java thread exercise