範例

public class ClassA {{
public int test (int i)
{
if (i == 0) {
return 1;
}
else {
return 0;
}
}
}

解決方案
請重新考量程式碼結構,只保留一個 return 陳述式