• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Does stop() method still can be used in Java2?

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am confused about this.
Since it's said stop() has deprecated in Java2, can we still use it?
In marcusgreen's exam2

Q22) What can cause a thread to stop executing?
One of the answers is:
A call to the thread's stop method.
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ivey Zhang:
I am confused about this.
Since it's said stop() has deprecated in Java2, can we still use it?


Hi Ivey,
yes you may use it but it's strongly recommended not to do so. The reason is that there are new methods which are supposed to be "better" in whatever way. Anyway, most developing suites reject deprecated methods (i.e. in fact you can't use them). As for the jdk1.3 you can type "javac -deprecation <filename>.java" and it compiles all right. If you use deprecated methods, however, you should really know what you're doing especially when multithreading is concerned.
 
The world's cheapest jedi mind trick: "Aw c'mon, why not read this tiny ad?"
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic