I'm trying to round a String.ValueOf to the nearest whole number. Any idea how to get String.valueOf(result) to the nearest whole number.
public void onClick(View v) {
double result =0;
double result1 =0;
double a = Double.parseDouble(weightEntered.getText().toString().trim());
double b = 2.2;
if(v == button_convert)
{
if(lbs_kg.isChecked() == true) {
result = (a / b);
String str = String.valueOf(result);
t1.setText(str);
}