I have 2 editing texts, and since I want to make them decimal, I cannot make them whole, so I need to turn them into double ones. I have this code, but in the n2Var text I have an error.
mul = (Button) findViewById(R.id.button);
n1 = (EditText)findViewById(R.id.editText);
n2 = (EditText)findViewById(R.id.editText2);
ans = (EditText)findViewById(R.id.TextView10);
double n1Var = Double.parseDouble(n1.getText().toString());
double n2Var = Double.parseDouble(n2,getText().toString());
Thanks for any help!
source
share