首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

错在哪呢?该怎么处理

2013-07-01 
错在哪呢?public class exam4 {public static void main(String[] args) {int maxvaluemaxvalue max(12

错在哪呢?
public class exam4 {
public static void main(String[] args) {
int maxvalue;
maxvalue = max(123, 22, 122);
System.out.println("三个数的最大值是" + maxvalue);
}

public static int max(int x, int y, int z) {
int temp, maxvalue;
temp = (x > y) ? x : y;
maxvalue = (temp > z) ? temp : z;
return maxvalue;
}
}
[解决办法]
没错啊,哪有什么错呢?

热点排行