class Demo public static int getMax (int a int b) { /* if (a==b) return ture; else return false; */ return(a==b)?ture:false; }
2 回答

woshiajuana
TA贡献211条经验 获得超152个赞
public static int getMax (int a int b):你声明的getMax函数的返回值是int类型
然后你返回的return(a==b)?ture:false;是布尔类型,所以错误
添加回答
举报
0/150
提交
取消