import java.net.*;
import java.io.*;
import java.util.*;
public class Client1{
public static void main(String[] args){
String server="localhost";
int port=80;
try{
Socket socket=new Socket(server,port);
BufferedReader inputStream=new BufferedReader(new InputStreamReader(socket.getInputStream()));
PrintWriter outputStream=new PrintWriter(new OutputStreamWriter(socket.getOutputStream()),true);
outputStream.println("Hello");
System.out.println(inputStream.readLine());
socket.close();
Server s=new Server();
}
catch(ConnectException e){System.out.println(e);}
catch(UnknownHostException e){System.out.println(e);}
catch(IOException e){System.out.println(e);}
}
}
when i execute this programme i got an error message"java.net.ConnectionException:Connection refused:connect".Telll me whats the problem with this programme.