📅  最后修改于: 2022-03-11 14:52:34.065000             🧑  作者: Mango
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());} }