Java Socket exception
<p>I am trying to write a simple client server program in Java :-
Running both server and client code on the same machine...but while running getting an error :- </p>

<pre>java.net.ConnectException: Connection refused: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(Unknown Source)
        at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.(Unknown Source)
        at java.net.Socket.(Unknown Source)
        at Requester.run(Requester.java:13)
        at Requester.main(Requester.java:68)
Exception in thread "main" java.lang.NullPointerException
        at Requester.run(Requester.java:45)
        at Requester.main(Requester.java:68)</pre>

<p>Can anyone help!</p>
