aspose file tools*
The moose likes Beginning Java and the fly likes Object Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Object Class" Watch "Object Class" New topic
Author

Object Class

Mathews P Srampikal
Ranch Hand

Joined: Nov 26, 2002
Posts: 211
why wait(),ntify() and notifyAll() methods included in Object Class


Thanks,
Mathews
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

http://www.coderanch.com/t/232227/threads/java/Food-thought-Threads-related


Groovy
Jacquie Barker
author
Ranch Hand

Joined: Dec 20, 2000
Posts: 201
It has to do with a concept called synchronization. Java is a multi-threaded language, meaning that a program can be written so that multiple processing "threads" can run simultaneously on a multi-processor machine; on a single processor machine, the JVM interleaves the various threads to make them appear to be running simultaneously.
At any rate, if there is a piece of code (a method)or an object that cannot safely be shared by more than one thread at the same time, we can do what is called "syncronizing" on that object or method so that it is GUARANTEED that only one thread can be accessing/affecting it at any given time.
These methods have to do with giving an Object the capability to be synchronized upon.
Hope this helps!


Author of Beginning Java Objects, Beginning C# Objects, and Taming the Technology Tidal Wave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Object Class