-3
爲2.0是像java,現在在3.0,我無法找到我的錯誤在此代碼:
的ActionScript synax錯誤
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.net.Socket;
public class Main {
public static void main(String[] args){
String hostName = "localhost";
Int portNumber = 16834;
String str = "starttimer\r\n";
try {
@SuppressWarnings("resource")
Socket socket = new Socket(hostName, portNumber);
OutputStreamWriter osw = new <br>OutputStreamWriter(socket.getOutputStream(), "UTF-8");$
send(str, osw);
} catch (Exception e) {
System.err.println(e.getMessage());
}
}
static void send(String str, OutputStreamWriter o) throws IOException {
o.write(str, 0, str.length());
o.flush();
}
}
順便說不要擔心哪裏去