Get System IP address in JAVA

programming

This is a code snippet to get the current IP address of a system.   import java.net.InetAddress; import java.net.UnknownHostException; public class IpAdress { //public static void main(String[] args){ public static InetAddress getIP() { InetAddress ip; try { ip = InetAddress.getLocalHost(); return ip; } catch (UnknownHostException e) { e.printStackTrace(); } return null; } }     Bikash Narayan PandaDeveloper, Tinkere, a proud Dad.. love to spend my available time playing with Tech!! wglabz.inDHT12 Sensor Interfacing with Linkit Smart 7688 Duo using Python/ArduinoSetting up NextCloud on Raspberry PiLockDown PC based on availability…

Read More