ReadNumberExample
-- converts strings to numerical values.
Experiment:
Try all kinds of input strings, both sensical and nonsensical.
Try successively larger integral values (millions, billions, etc.) and their negative counterparts.
Try successively larger floating point values (with exponents in the tens and hundreds), and their negative counterparts.
Try successively smaller floating point values (with exponents in the negative tens and negative hundreds).
To see this example in action:
Compile the Java source file, ReadNumberExample.java:
javac ReadNumberExample.java
Run the class:
java ReadNumberExample
The source.