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
提交
取消