标题:很是郁闷
只看楼主
nature89
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2013-5-13
结帖率:0
 问题点数:0 回复次数:0 
很是郁闷
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”
搜索更多相关主题的帖子: package Socket public import 
2013-12-06 13:33



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-424784-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.078908 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved