Search:

Type: Posts; User: lodha13

Search: Search took 0.37 seconds.

  1. Thread: synchronised

    by lodha13
    Replies
    4
    Views
    923

    Re: synchronised

    no its not locking the object in case of static synchronised
    in case of static
    the output is
    printname
    printvalue
    donewaiting
    why
  2. Thread: synchronised

    by lodha13
    Replies
    4
    Views
    923

    synchronised

    class B
    {
    public static synchronized void printName()
    {
    try
    {
    System.out.println("printName");
    Thread.sleep(5*1000);
    }
    ...
Results 1 to 2 of 2