2018年3月12日
摘要: public class TestSocket { //客户端向服务端发送消息,服务端返回消息 public static void main(String [] args) { Socket s = null; try { s = new Socket("127.0.0.1", 8888); St 阅读全文
posted @ 2018-03-12 22:46 00011101 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 需求:写一个闹钟程序,闹钟每隔2秒响一次,每次响5声,闹钟响铃后1秒,人将闹钟关闭.public class People implements Runnable { private String name; private Clock c; public People(String name, C 阅读全文
posted @ 2018-03-12 21:48 00011101 阅读(124) 评论(0) 推荐(0) 编辑