錯誤顯示: Unresolved compilation problems:
Syntax error on token ";", { expected after this token
Syntax error, insert "}" to complete Block
Syntax error on token "}", { expected after this token
Syntax error, insert "}" to complete Block
Syntax error on token "}", { expected after this token
Syntax error, insert "}" to complete Block
代碼如下:
try{
}catch(Exception exp){
}
這些代碼需要放在函數裡面
void func(){
try{
//代碼
}catch(Exception exp){
}
}