PDA

View Full Version : Trim floats or remove


twigZ
Jul 14, 2013, 04:06 AM
tv6.setText(String.valueOf((Float.valueOf(et1.getT ext().toString())*.14)+Float.valueOf(et1.getText() .toString())));
tv7.setText(String.valueOf(Float.valueOf(et2.getTe xt().toString())-Float.valueOf(tv6.getText().toString())));

I'm pretty new to coding :( I want to ask how the .0 or decimal in the output of the program I am using
here's what I am trying to do:

et1=gb et2=amount
Gross bill answers total and amount into change its like on cash registers I think :|
basically I want to convert the answers into Integer's or single number? Like instead of 114.0 it should be 114 only.
I'm sorry I am not really good at this but I am trying to learn java coding.