public class Cert extends
Thread
{
static int x=10;
public static void main(
String args[] ) throws Exception
{
Cert Cert = new Cert();
Thread t1 = new Thread(Cert);
Thread t2 = new Thread(Cert);
t1.start();
t2.start();
}
public synchronized void run()
{
System.out.print(++x + " ");;
}
}
In the above program can the Output be guaranteed ???.........I think the output can be guaranteed as Both the Thread are running on different Objects.....
.Am i Right ??