• 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

interrupt() and join()

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jordan,
Interrupt might stop a currently running thread, but join will not.
1. FALSE
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.
2. TRUE
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.
Regards,
Manfred.
 
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
I'm sure glad that he's gone. Now I can read this tiny ad in peace!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic