There are some bugs that I can't find the reasons, could somebody help?


#1

There are some syntax errors in the following codes, such as identifier or type expected , “;” expected… , but I can’t find the reason. Last night the program ran correctly, but today it went wrong.

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if(resultCode != Activity.RESULT_OK) {
return;
}


#2

The method is missing its closing brace } token.

@Override
protected void onActivityResult (int requestCode, int resultCode, Intent data) {
   if (resultCode != Activity.RESULT_OK) {
      return;
   }
} // <-- This is missing