接口中定義的字段會自動具有static和final屬性
//: RandVals
// Initializing interface fields with
// non
import java
public interface RandVals {
int rint = (int)(Math
long rlong = (long)(Math
float rfloat = (float)(Math
double rdouble = Math
} ///:~
由於字段是static的
//: TestRandVals
public class TestRandVals {
public static void main(String[] args) {
System
System
System
System
}
} ///:~
當然
From:http://tw.wingwit.com/Article/program/Java/hx/201311/25642.html