World of tricky Core Java Q and A Covering Object Oriented Analysis and Design, JVM Internals,Java Language Fundamentals,Datatypes,Keywords,Operators and Assignments,Identifies,Declarations and Modifiers, Conversion,Casting and Promotion, Flow control,Assertions, Exception Handling and Garbage Collection,Objects and Classes), Basic Packages and their classes,JDBC,JFC Swing,Java Server Pages (JSP), Servlets,EJB,JMS,JNDI etc and Open source technologies like Struts,Hibernate,Spring etc
Search This Blog
Wednesday, April 30, 2008
38. What is multithreading and what are the methods for inter-thread communication and what is the class in which these methods are defined?
Multithreading is the mechanism in which more than one thread run independent of each other within the process. wait (), notify () and notifyAll() methods can be used for inter-thread communication and these methods are in Object class. wait() : When a thread executes a call to wait() method, it surrenders the object lock and enters into a waiting state. notify() or notifyAll() : To remove a thread from the waiting state, some other thread must make a call to notify() or notifyAll() method on the same object.
Subscribe to:
Post Comments (Atom)
1 comment:
Hi
Hows your site going on ?
Well recently I changed my sites domain from http://jobgame.blogspot.com to http://www.jobholic.com
Please make a change on your site too
I'll be really thankful to you
Regards
Mohit Kumar
Admin http://www.jobholic.com
Post a Comment