I dont have a thread in my program, but my computer genius friend told me that every Java application is like a thread. He was kind of right because even though i dont have a Thread i use Thread.sleep ( ) to reduce lag. However, i need to stop the Thread when my program is over. He said that i should not use the Thread.stop ( ) method. What is a replacement for that method where i can stop the execution of the program?