관리 메뉴

nalaolla

Static Import 예제 1 본문

JAVA/13. StaticImport

Static Import 예제 1

날아올라↗↗ 2016. 6. 29. 15:18
728x90
  1. package java13staticImport;
  2.  
  3. import static java.lang.Math.*;
  4.  
  5. public class Test01staticImport {
  6.  
  7.     public static void main(String[] args) {
  8.         System.out.println("static import..");
  9.        
  10.         //원주율값을 갖는 객체를 쓰고싶다..
  11.         System.out.println(Math.PI);
  12.         System.out.println(PI);
  13.         System.out.println((int)(random() * 10));
  14.     }
  15.  
  16. }


728x90