【1】InetAddress 封装IP
package com.msb.test;
import java.net.InetAddress;
import java.net.UnknownHostException;
public class TestInetAddress {
public static void main(String[] args) throws UnknownHostException {
//操作InetAddress类,使用静态方法生成对象
InetAddress ia = InetAddress