I've been doing it somehow until now, but when I specified the variables, I finally found out the difference in the primitive types of the wrapper class, so I'll leave it as a memo.
Reason 1: It seems that the performance of the program deteriorates when using the wrapper class. Reason 2: The wrapper class allows nulls, which can mislead readers of behavior into thinking that "nulls can be entered". Reason 3: Since the wrapper class is one of the objects, if you try to compare the values with the comparison operator as follows, it will be false.
Also, the wrapper class has the advantage that methods can be used, but since they are static methods, you only have to call them when you want to use the method without using the wrapper class in the variable declaration, so basically the variable declaration There is no problem with primitive types.
Recommended Posts