How to use the integer and Double classes

How to use static methods to convert primitive types to String objects

Interger quantityIntObject = new Integer(quantity);

Double priceDoubleObject = new Double(price);

How to use static methods to convert String objects to rimitive types

int quantity = Integer.parseInt(quantityString);

double price = Double.parseDouble(priceString);

If the conversions fail, it will cause an error to occur.