parseInt() method is used to convert String to the primitive int type.