public void run() { char tmp; for (int i = 1; i < 10; i++) { tmp = sstack.read(); System.out.println("向字符缓冲区读出字符:" + tmp); try { Thread.sleep((int) (Math.random() * 10)); } catch (InterruptedException e) { } } }