F5 interview question

How do you write a multithreading program in Java