ArrayList Oject to float
in
Programming Questions
•
1 year ago
You have an arraylist. You access the items in it with
arraylistname.get(index)
but the result is an object. You want float. You write
Float.valueOf( arraylistname.get( index ).toString().trim()).floatValue();
and that works. But which approach would be easier, this seems to be overcomplicated.
1