title: How to pass double value to a textview in Android? (I'm new)
body: <p>I'm using EditText to store an input as a double, then using CheckBox to modify the value and store it in the variable "output".  I want to display the value of "output" in a TextView when the calculate button is clicked.</p>
  
  <p>Code</p>
  
  <pre><code>public class Cooking extends AppCompatActivity {
  
  public void calculate(View view) {
      EditText userInput = (EditText) findViewById(R.id.user_input);
      String numString = userInput.getText().toString();
      double num = new Double(numString).doubleValue();
      CheckBox ozCheckBox = (CheckBox)findViewById(R.id.oz);
      boolean ozInput = ozCheckBox.isChecked();
      CheckBox gCheckBox = (CheckBox)findViewById(R.id.g);
      boolean gInput = gCheckBox.isChecked();
      if(ozInput == true) {
          double output = num*28.3495;
      } else {
          double output = num;
      }
  }
  </code></pre>