OK. I know that according to Java Docs:
parseFloat will return a NumberFormatException - if the string does not contain a parsable float.
I thought that the parseFloat method would see if the first character is a number and if it is then it will read until it finds a character and then return the value up until but not including the character as a Float.
So with that in mind I am attempting to do the following and getting a NumberFormatException.
float value;
value = Float.parseFloat("50C");
I was hoping that it would return with value = 50.
Can someone please explain why the above conversion would return a NumberFormatException? Did I misunderstand what the parseFloat would do?