静态导入简易实现

import static java.lang.Math.PI; //静态导入
import static java.lang.Math.max;

public class StaticImportTest
{
public static void main(String[] args)
{
double pi=Math.PI;
double pp=PI; //静态导入
System.out.println(pi);
System.out.println(pp);
System.out.println(max(1,2));
}
}

posted @ 2014-04-07 22:58  圣婴  阅读(111)  评论(0)    收藏  举报