new Thread(this).start(); Assuming that "this" implements Runnable, does the thread get a chance to complete before being Garbage collected? Thanks in Advance,
Yes, the JVM will wait until the thread complete processing on "this" object... Objects are eligible to be garbage-collected, only after the things are done on them.... I'm sorry, if my explanation is not that clear... :roll:
Co-author of SCMAD Exam Guide, Author of JMADPlus SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
While the thread is running, it is referenced by the runtime system, so it can't be garbage collected.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus