Skip Top Navigation Bar

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!

  1. Given the String values for scoreText and distanceText, assign score and distance to their corresponding values.
  2. Modify the values of score by adding 5 and distance by multiplying by 2.