The difference between parseInt and valueof

paseInt constructs a constant value each time,

valueOf is an object comparison, the default value will be between -128-127 to return the existing object that already exists in the cache

Guess you like

Origin blog.csdn.net/qq_37669050/article/details/100739910