Delete Thread.sleep() from main method