Bookmark Topic Watch Topic
  • New Topic

Killing a process in sleep  RSS feed

 
Sonal Chawla
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,

There is Class A which executes its main and goes to sleep .

public static void main(String[] args) {
while (true) {
try {
Thread.sleep(1000);
}
catch (InterruptedException ex) {
ex.printStackTrace();
} }
}

Is there any way through which i can kill that instance of A.

Thanks
Sonal
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't crosspost. Continue discussion at http://www.coderanch.com/t/233310/threads/java/Killing-process-sleep
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!