📄 net1.java
字号:
import java.net.*;
class net1
{ public static void main(String args[ ])throws UnknownHostException
{ InetAddress addr1,addr2;
addr1=InetAddress.getLocalHost( );
addr2=InetAddress.getByName("www.sina.com.cn");
System.out.println(addr1);
System.out.println(addr2);
InetAddress addr3[ ]=InetAddress.getAllByName("www.biti.edu.cn");
for(int n=0;n<addr3.length;n++)
System.out.println(addr3[n]);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -