题目内容
public class SyncTest{ public static void main(String args) { final StringBuffer s1= new StringBuffer(); final StringBuffer s2= new StringBuffer(); new Thread () { public void run() { synchronized(s1) { s2.append(“A”); synchronized(s2) { s2.append(“B”); System.out.print(s1); System.out.print(s2); } } } }.start(); new Thread() { public void run() { synchronized(s2) { s2.append(“C”); synchronized(s1) { s1.append(“D”); System.out.print(s2); System.out.print(s1); } } } }.start(); } } Which two statements are true? ()
查看答案
搜索结果不匹配?点我反馈