How could I convert from float to string or string to float?
(我如何从float转换为string或string转换为float?)
In my case I need to make the assertion between 2 values string (value that I have got from table) and float value that I have calculated.
(在我的情况下,我需要在2个值字符串(我从表中获得的值)和我计算的浮点值之间进行断言。)
String valueFromTable = "25";
Float valueCalculated =25.0;
I tried from float to string:
(我尝试从float到string:)
String sSelectivityRate = String.valueOf(valueCalculated );
but the assertion fails
(但断言失败了)
ask by lola translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…