Convert float value to String
I'm programming for android, and I'm trying to display a float value found by the getX()
function in a Toast, which only displays String values. How do I do this conversion?
2
Author: Bandicoot_, 2018-07-01
2 answers
To convert a float value to a string, you can use the String.valueOf()
:
String str = String.valueOf(<valor float a ser convertido>);