Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Java (https://www.askmehelpdesk.com/forumdisplay.php?f=440)
-   -   Trim floats or remove (https://www.askmehelpdesk.com/showthread.php?t=758115)

  • Jul 14, 2013, 04:06 AM
    twigZ
    trim floats or remove
    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.

  • All times are GMT -7. The time now is 02:25 AM.