Hi, i wrote this code, but when i running program, there's error : "cannot find symbol method getInputStream()"
Please help me..
package Server;
import java.net.*;
import java.io.ObjectInputStream;
import java.net.Socket;
/**
*
* @author Owner
*/
public class ObjectServer {
private static int PORT = 5000;
private static ObjectInputStream in=null;
public static void main(String[] args) throws Exception {
ServerSocket serverSocket = null;
try {
Servsocket socketsv = new Servsocket(PORT);
Socket socket = socketsv.accept();
serverSocket = new ServerSocket(PORT);
in = new ObjectInputStream(serverSocket.getInputStream());
Message messageObject = (Message) in.readObject();
String messageText = messageObject.getText();
}
catch(Exception e) {
e.printStackTrace();
System.out.println("Error occured while creating the server socket");
return;
}
Socket socket = null;
try {
socket = serverSocket.accept();
} catch (Exception e) {
System.out.println("Error occured while creating the server socket");
return;
}
} }