我階的新的學習能力,我試圖運行此示例代碼斯卡拉怎麼寫,如果其他
def isLast(c: Int, r: Int):Int ={
if(r == 1)
{
return 1;
}
else if (r == c){
return 1
}
}
但它給我的編譯時錯誤,說
Multiple markers at this line
- type mismatch; found : Unit required: Int
- type mismatch; found : Unit required: Int
請幫助我,也建議我一些學習Scala的好網站。
這是啓動Scala的好地方。 http://twitter.github.com/scala_school/ –