Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: wait() and notify()

  1. #1
    Junior Member
    Join Date
    Feb 2014
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default wait() and notify()

    i m new to java ... i have read many aticles on net regarding wait() and notify() but unable to get ..can you please make me understand about these two method with example


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    6,103
    My Mood
    Mellow
    Thanks
    244
    Thanked 755 Times in 741 Posts

    Default Re: wait() and notify()

    Reading articles is the first step, perhaps 10% of the process of learning. Us giving you more to read doesn't make that 10% any bigger. The other 80 - 90% is putting what you've read into practice, right and wrong, through coding. Show us what you've tried and ask any questions you have about the results.

  3. #3
    Junior Member
    Join Date
    Feb 2014
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: wait() and notify()

    hi sir can you provide me a best site(url) for java Thread from which i gain more ..

  4. #4
    Member andbin's Avatar
    Join Date
    Dec 2013
    Location
    Italy
    Posts
    443
    Thanks
    4
    Thanked 122 Times in 114 Posts

    Default Re: wait() and notify()

    Quote Originally Posted by gautammuktsar@gmail.com View Post
    hi sir can you provide me a best site(url) for java Thread from which i gain more ..
    A good start is Lesson: Concurrency (The Java™ Tutorials > Essential Classes)

    Some more you can get from articles like Java 101: Understanding Java threads, Part 1: Introducing threads and runnables | JavaWorld

    If you want to go more more deeper, buy "Java Concurrency in Practice", by Addison-Wesley Professional.
    Andrea, www.andbin.netSCJP 5 (91%) – SCWCD 5 (94%)

    Useful links for Java beginnersMy new project Java Examples on Google Code

  5. #5
    Junior Member
    Join Date
    Jun 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: wait() and notify()

    wait()-- It is used to send the running thread into waiting mode, means stand by mode.

    notify()-- It is used to send waiting thread into "Ready State Queue", means it will put the waiting thread into "Ready Queue"

  6. #6
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    6,103
    My Mood
    Mellow
    Thanks
    244
    Thanked 755 Times in 741 Posts

    Default Re: wait() and notify()

    @chsvravikumar@gmail.com: Please check the most recent response date on threads. If a thread has been dormant for ~> 1 month, it's dead, the OP has moved on and probably doesn't care anymore.

    However, if you have a gem of a good idea that you want to share with someone trying to do the same thing who may happen by someday, then by all means add it. (In this case, your post is not an example of such a gem.)

Similar Threads

  1. wait(); and notify();
    By tenacious23cb in forum What's Wrong With My Code?
    Replies: 1
    Last Post: August 14th, 2013, 05:36 PM
  2. Simple multithreading using wait and notify
    By fgstat in forum What's Wrong With My Code?
    Replies: 3
    Last Post: July 27th, 2013, 03:20 AM
  3. Help wanted using wait() and notify()
    By sandramo in forum Java Theory & Questions
    Replies: 7
    Last Post: March 29th, 2013, 01:19 PM
  4. wait(), sleep() and notify()
    By evthim in forum Threads
    Replies: 3
    Last Post: October 30th, 2012, 12:37 PM
  5. How to notify() and proceed past wait()
    By kernel_klink in forum What's Wrong With My Code?
    Replies: 5
    Last Post: February 21st, 2012, 07:40 PM