1.写两个线程,一个打印1~52,另一个打印A~Z,打印顺序是12A34B....5152Z
package www.wl.java.link; class Print{ private boolean flag=true; private int count=1; public synchronized void printNum(){ if(flag==false){ try { wait(); } catch (InterruptedException e) { e.printStackTrace (); } } System.out.print (2*count-1); System.out.print (2*count); flag=false; notify (); } public synchronized void printChar(){ if(flag==true){ try { wait(); } catch (InterruptedException e) { e.printStackTrace (); } } System.out.print((char)( 'A'+count-1)+" "); flag=true; count++; notify (); } } public class 打印 { public static void main(String[] args) { Pr