title: How to show the result of the conditional operation in this case?
body: <p>I'm new to programming and I'm learning to tinker with Android Studio.</p>
  
  <p>Context:
  On the screen, the user enters four values and pressing the button, the sum of the values is performed and the result appears on the screen. But now, I need to also show the result of "sorting", in this case, it is represented by "dpaResult".</p>
  
  <p>Problem:
  I need help to know how to show the "dpaResult" result of the conditional operation below. Here's the snippet of code I've done: (I've left some comments inside the code)</p>
  
  <pre><code>buttonEnviar.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {
          int valorS = Integer.valueOf(editValorS.getText().toString());
          int valorT = Integer.valueOf(editValorT.getText().toString());
          int valorU = Integer.valueOf(editValorU.getText().toString());
          int valorV = Integer.valueOf(editValorV.getText().toString());
  
          //Sums DPA array fields
          int dpa = (valorS + valorT + valorU + valorV);
  
          //Sorts the DPA Matrix
          if (dpa&lt;=10){
              String dpaResult = "Baixo";
              Log.i("DPA ", dpaResult);
          }else if (dpa&gt;10 &amp;&amp; dpa&lt;16){
              String dpaResult = "Médio";
              Log.i("DPA ", dpaResult);
          }else if (dpa&gt;=16){
              String dpaResult = "Alto";
              Log.i("DPA ", dpaResult);
          }
  
          textResultado.setText(String.valueOf("O resultado é: " + dpa));//Here only shows the sum value, I need the value "dpaResult" too !!
      }
  });
  </code></pre>
  
  <p>Note: If you need to, I can put the code in full, including xml.</p>
  
  <p>I thank you for your help</p>