관리 메뉴

nalaolla

Method 예제 1 (예외처리) 본문

JAVA/8. Method1

Method 예제 1 (예외처리)

날아올라↗↗ 2016. 6. 22. 17:22
728x90
  1. package test.com;
  2.  
  3. import java.net.InetAddress;
  4. import java.net.UnknownHostException;
  5.  
  6. public class GetIP {
  7.  
  8.     public static void main(String[] args) throws UnknownHostException {
  9.         // TODO Auto-generated method stub
  10.         InetAddress ip = InetAddress.getByName(null);
  11.         System.out.println(ip);
  12.  
  13.     }
  14.  
  15. }


728x90

'JAVA > 8. Method1' 카테고리의 다른 글

Method 예제 5  (0) 2016.06.22
Method 예제 4  (0) 2016.06.22
Method 예제 3 (활용예제)  (0) 2016.06.22
Method 예제 2 (Method 정리)  (0) 2016.06.22