就是比如说,serverSocket = new ServerSocket();中需要输入的是int型的数字,我想从JTextFiled框中输入的数据让ServerSocket读取~
采用nteger.parseInt()方法后,虽然编译无错,但是run时提示
Exception in thread "main" java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:468)
at java.lang.Integer.parseInt(Integer.java:497)
at ChatServer.<init>(ChatServer.java:27)
at ChatServer.main(ChatServer.java:373)