Im using a hashtable to save filename (string) and InetAddress
Hashtable <String , InetAddress > file_location = new Hashtable <String , InetAddress >();
and im using this to retrieve the address, but im only getting a null value returned
file_location.put("ABD_9158" , IPAddress); //IPAdress is of InetAddress type
InetAddress n = file_location.get("ABD_9158");
System.out.println(n);
tried changing n to a string but , havent been able to find away my question, how do retrieve the ipaddress ?
This is a small program, to check what you want. Same piece of code, what you have shared, it is working fine.
Output