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

Posted on 2001-08-24
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.
Question by:hmlau
  • 2

Accepted Solution

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().
LVL 92

Expert Comment

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

Expert Comment

ID: 6421322
stop() is deprecated because it is error prone as mentioned in the javadoc.

Author Comment

ID: 6427193
Hi objects,

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


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to convert String matching to regex in java 4 48
hibernate jars 4 45
CSV file parsing thru Java 13 34
servlet and mdb, jms error 1 29
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 …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

791 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