Solved

warning: stop() in java.lang.Thread has been deprecated

Posted on 2001-08-24
4
842 Views
Last Modified: 2008-03-10
Hi All,

I'm beginner 4 Java,
I found this msg when I try to compile my code..
How could I solve this ?

Thank You.
0
Comment
Question by:hmlau
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
kotan earned 5 total points
ID: 6421218
deprecated means that method stop() is old. You should use other new method.

In here, you should use interrupt() instead of stop().
0
 
LVL 92

Expert Comment

by:objects
ID: 6421321
Careful there, interrupt() and stop() do very different things.
0
 
LVL 92

Expert Comment

by:objects
ID: 6421322
stop() is deprecated because it is error prone as mentioned in the javadoc.
0
 
LVL 1

Author Comment

by:hmlau
ID: 6427193
 
Hi objects,

May I know what is the difference between stop() and interrupt() ??

Thanks.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
servlet filter example 37 83
String array comparison 4 45
Is there a simpler dropbox system? 10 44
restrict decimal places for double datatype 10 31
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question