看java 笔试题

interface MyConstants {
int r =42;
int s = 69;
int Area;
//插入代码
final double circumference = 2 *Math.PI*r ;
//Cannot reference a field before it is defined
int total = total + r +s; //后面的total会出错
int ArRa = r*s;

// Syntax error on token "MAIN", VariableDeclaratorId expected after this token
public static MAIN=15; //MAIN不对

//Illegal modifier for the interface field MyConstants.CODE; only public, static & final are permitted
protected int CODE = 31337; //CODE不对

}

 

//http://www.job006.com/forum.php?mod=viewthread&tid=30071&extra=page=1&filter=typeid&typeid=794&typeid=794

posted on 2015-04-12 23:11  khp123  阅读(125)  评论(0编辑  收藏  举报

导航