This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
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
posted 14 years ago
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.