Results 1 to 3 of 3
  1. #1
    simon is offline Member
    Join Date
    Jul 2007
    Posts
    44
    Rep Power
    0

    Default doubt about synchronized

    I have a method which is a synchronized method (for example, method Foo in the following code block) and in this synchronized method another method which is not synchronized is invoked (for example, method Goo in the following code block). I'm wondering when executing in Goo from Foo, whether we still have the synchronized feature
    Java Code:
    synchronized public Foo()
    {
        Goo();
    }
    
    private Goo()
    {
    }

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    9

    Default

    As far as the callers of Foo are concerned, yes. But who else can be calling Goo besides Foo?

  3. #3
    simon is offline Member
    Join Date
    Jul 2007
    Posts
    44
    Rep Power
    0

Similar Threads

  1. doubt
    By shaju_inspira in forum Sun Java Wireless Toolkit
    Replies: 0
    Last Post: 01-18-2008, 08:38 AM
  2. doubt in jms
    By veena in forum Enterprise JavaBeans (EJB)
    Replies: 2
    Last Post: 01-05-2008, 01:42 PM
  3. Please clear my doubt...............
    By vinaytvijayan in forum Advanced Java
    Replies: 0
    Last Post: 12-26-2007, 06:23 PM
  4. synchronized
    By bugger in forum New To Java
    Replies: 2
    Last Post: 11-28-2007, 10:33 AM
  5. Return in the Middle of synchronized Block
    By ariak in forum Advanced Java
    Replies: 1
    Last Post: 07-26-2007, 10:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •