title: Multiplication from 2 field, too many variable
body: <p>i practice my beginners skill in android and now i did the application which gets 2 numbers from 2 <code>editText</code> and display score in next <code>editText</code></p>
  
  <p>Is it a good practice to do it? I belive better programmers have shortest way to do that.</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      private Button button;
      private EditText editText,editText2,editText3;
      private String a,b,c;
      private Double x1,x2,x3;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          button = (Button) findViewById(R.id.button);
          editText = (EditText) findViewById(R.id.editText);
          editText2 = (EditText) findViewById(R.id.editText2);
          editText3 = (EditText) findViewById(R.id.editText3);
  
          button.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
  
                  a = editText.getText().toString();
                  b = editText2.getText().toString();
                  x1 = Double.parseDouble(a);
                  x2 = Double.parseDouble(b);
  
                  calc(x1,x2);
  
              }
          });
  
      }
  
      private void calc(double x1, double x2){
  
          x3 = x1 * x2;
          c = String.valueOf(x3);
          editText3.setText(c);
  
  
      }
  </code></pre>