我的代码是这样的......它的输出为零......请帮助我..提前谢谢:)
final AutoCompleteTextView inputValues = (AutoCompleteTextView) findViewById(R.id.txt_input);
final TextView GeoMean= (TextView) findViewById(R.id.txt_GeoMean);
Button btnCalculate = (Button) findViewById(R.id.btncalculate);
btnCalculate.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View agr0) {
String []values = ( inputValues.getText().toString().split(","));
int [] convertedValues = new int[values.length];
int product=1;
for(int a = 1; a <=convertedValues.length; a++){
product*=convertedValues[a];
}
tv_product.setText(Double.toString(product));