很是郁闷
package com.itcast;import
import
import
import javax.print.DocFlavor.INPUT_STREAM;
import javax.print.attribute.standard.OutputDeviceAssigned;
public class ServerSocket {
public static void main(String[] args) {
ServerSocket ss=new ServerSocket(9090);
Socket s=ss.accept();
InputStream in=s.getInputStream();
byte[] buf=new byte[1024];
int len=buf.length;
String arr=new String(buf,0,len);
System.out.println(arr);
PrintWriter out=new PrintWriter(s.getOutputStream());
out.println("<font size='7' color='green'>这是我的自定义服务器 </font>");
}
}
D:\0217\day10>javac ServerSocket
错误:仅当显式请求注释处理时才接受类名称“ServerSocket”