[Solved] what should i do with this error in code of addition of two numbers? [closed]


You have your method defined outside your class. Use this structure:

public class MainActivity extends ActionBarActivity{

     @Override
     protected void onCreate(Bundle savedInstanceState){
         ...
     }

     public void onAddClick(View a){
         ...
     }
}

solved what should i do with this error in code of addition of two numbers? [closed]