```
public void toggleoperator(View v){
    ToggleButton oprtoggle = (ToggleButton) findViewById(R.id.operatortoggle);
    boolean add = ((oprtoggle.isChecked()));
    if (add){
        oprtoggle.setTextOn("Add");
        int x = 1;

    } else {
        oprtoggle.setTextOff("Subtract");
        int x = -1;
    }

public void sumNumbers(View v){
    EditText input1 = (EditText) findViewById(R.id.input1);
    int calc1 =  Integer.parseInt(String.valueOf(input1.getText()));
    EditText input2 = (EditText) findViewById(R.id.input2);
    int calc2 = Integer.parseInt(String.valueOf(input2.getText()));
    int totaladd = calc1 + calc2;
    int totalsubtract = calc1 - calc2;
    if (add) {
        String result = String.valueOf(totaladd);
    } else {
        String result = String.valueOf(totalsubtract);
    }
    EditText output1 = (EditText)findViewById(R.id.output);
    output1.setText(result);
    }

```

I'm trying to get the above code to work. For one, I want to reference the boolean 'add' from the first method to the second method, how would I go about doing that? Also, I'm getting a 'Not a statement' error on this line

```
String result = String.valueOf(totalsubtract);

```

Help? And please explain too, otherwise I won't learn!