-
Junior Member
Java FAQ's
Hi ,
Can u tell me why is wait,Notify,Notifyall methods declared in object class only.
-
Junior Member
Re: Java FAQ's
Because for every class u create in java, the base class is Object..hope u got
-
Junior Member
Re: Java FAQ's
Ok thats fine,But why is these methods declared in Object class rather than Thread class.My real question is we r using this methods only in threads not for any other purposes. so Iam still not agreeing to ur answer.
-
Junior Member
Re: Java FAQ's
Hi
All those methods uses the lock on the object.locks are acquired and released at the object level.. since Object is the base class for all the classes,those methods are in Object class.. hope u are clear now.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules