This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes question about Thread object,yield and private Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "question about Thread object,yield and private" Watch "question about Thread object,yield and private" New topic
Author

question about Thread object,yield and private

michael wang
Ranch Hand

Joined: Feb 06, 2002
Posts: 35
i am confused by three concept
1.what is the difference between thread and thread object
2. what does join use for?
3.Is is true that everything in the class except constuctor will be inherited by its subclass?
if true,what about private variable or method?
thanks


--<br />a java beginner from China
Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
Thread (with a big "T") is a java class ; see java.lang.Thread. When people say "a thread" they usually mean "an instance of class thread" or "an object of type thread".
join() will cause the current thread to stop, and wait for the thread on which it is called to finish, before continuing.
Only non-private members are inherited by a sub-class. Constructors are a special kind of member, they are not inherited. Neither are private methods or variables. Everything else is inherited.


Rob
SCJP 1.4
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: question about Thread object,yield and private