小弟能力有限,看不出程序错在哪?麻烦大家看一下。
import java.net.*;public class send {
public static void main(String[] args )
{
try {
String s="wwwwwwwww";
byte [] buffer=getBytes();
DatagramPacket outpacket = new DatagramPacket(buffer, buffer.length,
"202.118.198.26", 3000);
DatagramSocket outsocket=new DatagramSocket();
outsocket.send(outpacket);
}
catch(Exception e)
{ System.err.println(e);}
}
}
谢谢了