-1
如何在此遞歸中嘗試並捕獲異常?如何在遞歸中查找異常
這是代碼:
try
{
public static long faktoral(long a)
{
return a*faktoral(a-1);
}
}
catch(exception e){
System.out.print(e.message());
public static void main(String [] args)
{
System.out.print(faktoral(3));
}
歡迎。請在您提問時提供有關您所犯錯誤的詳細信息。實際異常文本的追溯通常對試圖回答您的問題的人有用...... – Sheena