• 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

Threads - destroy method

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is what JDK 1.3 documentation say about destroy method of Thread
public void destroy()
Destroys this thread, without any cleanup. Any monitors it has locked remain locked.
(This method is not implemented.)
Attention to last statement.
Does it mean that it is not implemented in JDK
or it is not implemented in Java 2?
Do we have to ignore the fact that it is not implemented
for exam purpose?
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perhaps "Not implemented" means implementation left to the JVM vendor. I am not very sure, but just guessing.
IMO this is an advanced concept, and for the purpose of SCJP, I am sure you can ignore this method. Please revisit the SCJP objectives so that you know what is covered under Threads for the exam.
Ajith
 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes the destroy method is not implemented in Jdk1.3. This may mean that it might be implemented in future versions of the Jdk. Infact if you see the source code of Thread class, the destroy method simply throws a NoSuchMethodError.
I don't think this is on the exam objectives list.
 
reply
    Bookmark Topic Watch Topic
  • New Topic