Strings Cannot Add



Goal:

Learn how the + operator works differently with Strings and numbers. Learn how to convert String objects to numbers when math operations are needed.

Steps:

  1. Follow all the instructions in the main method.
  2. Observe how the + operator joins Strings to produce a new (longer) String.
  3. Use the Integer.parseInt() method to convert Strings to numbers.
  4. Observe how the + operator adds numbers to produce a sum.