File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Mock Exam Errata and the fly likes interrupt() and join() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "interrupt() and join()" Watch "interrupt() and join()" New topic

interrupt() and join()

jordan gong
Ranch Hand

Joined: Jun 12, 2001
Posts: 37
Dear Helper:
Will interrupt() and join() stop "a currently running thread"?
Are the following statements correct?
1. Uninitialized object gets the default value, no matter the reference to the object is local or member variable.
2. Chaining of the finalize() methods is not enforced by the compiler and it is not mandatory to call the overriden
finalize() method.
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Jordan,
Interrupt might stop a currently running thread, but join will not.
Only uninitialized class variables get default value automatically assigned to them. Local variables never get default values automically assigned. The exception is arrays, they always get default values assigned no matter where they are defined.
It is good programming practice to call the superclasses finalize method just to be safe. When you override it, the superclass finalize method never gets called, so the work the superclass performed will be lost. This is not mandatory and the compiler will not complain if you don't do it.
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi Jordan,
I'm going to move this post to Certification Study, this forum is to check on possible errors in mock exams.
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform

Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
I agree. Here's the link:
subject: interrupt() and join()
It's not a secret anymore!