File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object Class

 
Mathews P Srampikal
Ranch Hand
Posts: 211
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why wait(),ntify() and notifyAll() methods included in Object Class
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
 
Jacquie Barker
author
Ranch Hand
Posts: 201
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic