public class SyncTest { private int x; private int y; public synchronized void setX (int i) (x=1 public synchronized void setY (int i) (y=1 public synchronized void setXY(int 1)(set X(i); setY(i) public synchronized Boolean check() (return x !=y }
hi all, can anybody suggest whts the output with the explanation for the above program?
There is no output as you have no main method or and none of the methods are called. This is only a partial code snippet, your question cant tbe answered.