这代码乱的,把24行的那个分号取掉。编程习惯太不好了。
while ((line = bufr.readLine()) != null) {
if ("886".equals(line)) {
break;
} byte[] buf = line.getBytes(); DatagramPacket dp = new DatagramPacket(buf,
buf.length,
InetAddress.getByName("113.251.218.70"), 11000); ds.send(dp);
}
以后这么写,有if全加上{},别写那么随意,一看就是初学者的写法。
while ((line = bufr.readLine()) != null) {
if ("886".equals(line)) {
break;
} byte[] buf = line.getBytes(); DatagramPacket dp = new DatagramPacket(buf,
buf.length,
InetAddress.getByName("113.251.218.70"), 11000); ds.send(dp);
}
以后这么写,有if全加上{},别写那么随意,一看就是初学者的写法。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货