Solved

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

Posted on 2001-08-24
4
823 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

867 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now