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:
- Follow all the instructions in the main method.
- Observe how the + operator joins Strings to produce a new (longer) String.
- Use the Integer.parseInt() method to convert Strings to numbers.
- Observe how the + operator adds numbers to produce a sum.