Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Write a java program to print the ip address

import java.net.InetAddress;public class Main{public static void main(String args[]) throws Exception{InetAddress IP = InetAddress.getLocalHost();System.out.println("IP address= "+IP.getHostAddress());} }
Source by inlarn.com #
 
PREVIOUS NEXT
Tagged: #Write #java #program #print #ip #address
ADD COMMENT
Topic
Name
6+6 =