wood burning stoves
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Thread question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Thread question" Watch "Thread question" New topic

Thread question

Mansi Dave
Ranch Hand

Joined: Aug 06, 2002
Posts: 49
Why is it possible to create threads without importing the java.lang.Thread class?
sun par
Ranch Hand

Joined: Oct 03, 2002
Posts: 257
it is because the java.lang package is imported by default in any java program

Sunita<br />SCJP 1.4
Shishio San
Ranch Hand

Joined: Aug 29, 2002
Posts: 223

7.5.3 Automatic Imports
Each compilation unit automatically imports all of the public type names declared in the predefined package java.lang, as if the declaration:
import java.lang.*;
appeared at the beginning of each compilation unit, immediately following any package statement.

Whatever doesn't kill us ...<br />Is probably circling back for another try.<br />SCJP 1.4
Mansi Dave
Ranch Hand

Joined: Aug 06, 2002
Posts: 49
Thanks for the info.
I agree. Here's the link: http://aspose.com/file-tools
subject: Thread question
It's not a secret anymore!