首页 相关文章 Java源码:URL编程

Java源码:URL编程

Example 1 Below is a simple Java program which can get the hostname of a computer
from IP address. download now

Tips
1. Compile: javac GetHost
2. Run: java GetHost 111.111.111.1(your IP or others)
import java.io.*;
import java.net.*;
//
//
// GetHost.java
//
//
public class GetHost
{
public static void main (String arg[]){
if (arg.length=1){
InetAddress[] Inet;
int i=1;
try{
for (i=1;i=arg.length;i++){
Inet = InetAddress.getAllByName(arg[i-1]);
for (int j=...[ 查看全文 ]

2016-02-19 标签:

Java源码:URL编程的相关文章

手机页面
收藏网站 回到头部