Connection through ip address
<p>I am trying to obtain the ip address from a text file so when I use the following code it does noy work..</p>

<pre><code>  System.out.println("get = "+get);     //get is where the ip address is stored after reading from file and it is successfully received as well
  Socket client=new Socket(get,5000);
</code></pre>

<p>I have even tried the same thing through InetAddress as follows..but it does not work as well.</p>

<pre><code>  InetAddress ik= InetAddress.getByName(get);
  Socket client=new Socket(ik,5000);    
</code></pre>

<p>but when I manually provide the ip in get it works.I dont understand where am I wrong?</p>

<pre><code>  String get="192.168.1.224";
</code></pre>
