当前位置: 代码迷 >> J2SE >> 错在哪呢?该怎么处理
  详细解决方案

错在哪呢?该怎么处理

热度:63   发布时间:2016-04-23 22:21:27.0
错在哪呢?
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;
}
}

------解决方案--------------------
没错啊,哪有什么错呢?
  相关解决方案