Champagne Floats
Suppose you've got a string that contains a floating point number: "3.5" or "2.5E-3". Your goal is to get afloat
from that number. There are a few different techniques to try...If you're familiar with parseDouble(), you could use that and then cast:
String s = ...;
float a = (float) Double.parseDouble(s);
Or you could save some bits and parse directly using parseFloat():
String s = ...;
float b = Float.parseFloat(s);
Do the two mechanisms yield the same result?
Ponder the problem, and when you're ready you can read my analysis in the comments...