I am trying to obtain the ip address from a text file so when I use the following code it does noy work..
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);
I have even tried the same thing through InetAddress as follows..but it does not work as well.
InetAddress ik= InetAddress.getByName(get);
Socket client=new Socket(ik,5000);
but when I manually provide the ip in get it works.I dont understand where am I wrong?
String get="192.168.1.224";
Simply: