Solved

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

Posted on 2001-08-24
4
848 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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  can  i  resolve  HTTP Status 404 -? 8 78
dao vs facade design patterns 2 69
Html split(text) 2 49
Selenium findElement(By.classname  identifier 15 34
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…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
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 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…
Suggested Courses

734 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