?? internet.java
字號:
// ==================== Program Discription ==================
// 程序名稱:示例12-2: Internet.java
// 程序目的:熟悉getHostName( )和tostring( )方法
// ==============================================================
import java.net.*;
import java.io.*;
class Internet
{
public static void main(String args[])
{
try {
InetAddress inetadd;
inetadd=InetAddress.getLocalHost();
System. out. println("hostname="+inetadd.getHostName());
System. out. println(inetadd.toString() );
}
catch(Exception e) {
System.out.println(e);
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -