InetAddress
Java
System.out.print("Insert HostName: ");
Scanner input=new Scanner(System.in);
String host=input.nextLine();
try{
InetAddress ip=InetAddress.getByName(host);
System.out.println(ip);
if(ip.isReachable(50)){
System.out.println("Destination Reached");
}
else{
System.out.println("Destination Unreachable");
}
}
catch (Exception e){
System.out.println("Invalid domain");
}
Also in Java:
- Title
- how to add java_home in mac
- Category
- Java
- Title
- lopp array java
- Category
- Java
- Title
- how to create a 2d arraylist java
- Category
- Java
- Title
- Matlab java.lang.IllegalArgumentException: Invalid range
- Category
- Java
- Title
- boolean checkbox swing
- Category
- Java
- Title
- deserialize date java
- Category
- Java
- Title
- spring data jpa inheritance repository
- Category
- Java
- Title
- how to make an object move with arrow keys in java
- Category
- Java
- Title
- java throws multiple exceptions
- Category
- Java
- Title
- creating random color in java
- Category
- Java
- Title
- how to do a linear searc in java
- Category
- Java
- Title
- JavaFX onMouseEntered
- Category
- Java
- Title
- java builder pattern example
- Category
- Java
- Title
- take string from keyboard java
- Category
- Java
- Title
- how to pass a float between activities in android studio
- Category
- Java
- Title
- sort a map based on keys and values using java 8
- Category
- Java
- Title
- open an existing excel file in java apache poi
- Category
- Java
- Title
- socket programming in java
- Category
- Java
- Title
- mkyong restful web services spring boot examples post
- Category
- Java
- Title
- string to double java
- Category
- Java
- Title
- sort elements with sortedset
- Category
- Java
- Title
- html top padding
- Category
- Java
- Title
- initialize scanner java
- Category
- Java
- Title
- how to get the checkbox checked value in javafx
- Category
- Java
- Title
- java if a or b
- Category
- Java
- Title
- java arraylist to string
- Category
- Java
- Title
- java logical operator
- Category
- Java
- Title
- how to compare current date and time with another date and time in android
- Category
- Java
- Title
- java while loop break
- Category
- Java
- Title
- java round up
- Category
- Java
- Title
- java for
- Category
- Java
- Title
- binary search java
- Category
- Java
- Title
- jenkins decrypt password script console
- Category
- Java
- Title
- link to method javadoc
- Category
- Java
- Title
- java singleton
- Category
- Java
- Title
- java bubble sort short circuit
- Category
- Java
- Title
- install java debian 8
- Category
- Java
- Title
- java pass array as method parameter
- Category
- Java
- Title
- java scanner next()
- Category
- Java
- Title
- java append to array
- Category
- Java
- Title
- find length of array java
- Category
- Java
- Title
- read csv java android
- Category
- Java
- Title
- java compareto
- Category
- Java
- Title
- java insert into arraylist
- Category
- Java
- Title
- priority queue java reverse order
- Category
- Java
- Title
- how to add element to arraylist
- Category
- Java
- Title
- java concatenate strings
- Category
- Java
- Title
- java how to get all threads
- Category
- Java
- Title
- java
- Category
- Java
- Title
- arraylist array
- Category
- Java
- Title
- spannable string in android java for color
- Category
- Java
- Title
- using java 8 stream to process data in java
- Category
- Java
- Title
- how to add integers in java
- Category
- Java
- Title
- java split string
- Category
- Java
- Title
- android get distance between two locations kotlin
- Category
- Java
- Title
- java loop object
- Category
- Java
- Title
- get tfidf score for a sentence
- Category
- Java
- Title
- how do I change the opacity of a JButton
- Category
- Java
- Title
- java scanner input int
- Category
- Java
- Title
- How to chage font progrmatically
- Category
- Java
- Title
- java intercept ctrl c
- Category
- Java
- Title
- number of matches regex java
- Category
- Java
- Title
- java function without return
- Category
- Java
- Title
- summary of operator java
- Category
- Java
- Title
- math min max java
- Category
- Java
- Title
- remove part of string java
- Category
- Java
- Title
- java random seed
- Category
- Java
- Title
- absolute value in java
- Category
- Java
- Title
- android studio remove notification bar
- Category
- Java
- Title
- java sum of two numbers program intellij
- Category
- Java
- Title
- android recyclerview show hide item with animation with default animation
- Category
- Java
- Title
- android studio java random number generator
- Category
- Java
- Title
- eliminar fila jtable java
- Category
- Java
- Title
- java file class
- Category
- Java
- Title
- find numbers in a string java
- Category
- Java
- Title
- linux pyspark select java version
- Category
- Java
- Title
- java djikstra's algorithm
- Category
- Java
- Title
- IN APPLet how to disable a button in java
- Category
- Java
- Title
- getindexrequest elasticsearch
- Category
- Java
- Title
- immagini java
- Category
- Java
- Title
- Java copy file
- Category
- Java
- Title
- get drawable with string android java
- Category
- Java
- Title
- replaceall in java
- Category
- Java
- Title
- java loop through object
- Category
- Java
- Title
- java cmd install raspbian
- Category
- Java
- Title
- bigdecimal divide java
- Category
- Java
- Title
- java iterator example
- Category
- Java
- Title
- java define main function
- Category
- Java
- Title
- how to substring in java
- Category
- Java
- Title
- java read lines from file
- Category
- Java
- Title
- what is java plug-in
- Category
- Java
- Title
- equls en java
- Category
- Java
- Title
- get day name from date in java
- Category
- Java
- Title
- how to check if the file has remaining without reading from it java
- Category
- Java
- Title
- how to make an array in java
- Category
- Java
- Title
- java read integer from text file into array scanner
- Category
- Java
- Title
- spigot chat color with symbol
- Category
- Java
- Title
- java switch
- Category
- Java
- Title
- how to make a variable unchangeable in java
- Category
- Java
- Title
- how to use pow function in java
- Category
- Java