Solved

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

Posted on 2001-08-24
4
806 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
Comment Utility
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
Comment Utility
Careful there, interrupt() and stop() do very different things.
0
 
LVL 92

Expert Comment

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

Author Comment

by:hmlau
Comment Utility
 
Hi objects,

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

Thanks.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

763 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

11 Experts available now in Live!

Get 1:1 Help Now