Experiment with the Parsing Methods
In this activity, you will write program code to use the parse methods to convert String values. In these exercises, we use IO instead of System.out. The results are the same. Feel free to edit the output statements to use System.out if you prefer.
Grab a Piece of Paper, Predict and Try!
- Given the String values for
scoreTextanddistanceText, assignscoreanddistanceto their corresponding values. - Modify the values of
scoreby adding 5 anddistanceby multiplying by 2.