������14.public class Syntest
public static void main(
String []args)
final StringBuffer s1=new StringBuffer();
final StringBuffer s2=new StringBuffer();
new
Thread()
public void run()
synchronized(s1)
s1.append("a");
synchronized("b")
System.out.println(s1);
System.out.println(s2);
.start();//not error
new Thread()
public void run()
synchronized(s2)
s2.append("c");
synchronized(s1)
s1.append("d");
System.out.println(s2);
System.out.println(s1);
.start();
output?
a)print ABBCAD
b)print CDDACB
c)print ADCBADBC
d)The output is a not-deterministic point because of a
possible deadlock condition
e)The output is dependent on the threading model of
the ysstem the program is running on.