Open ivorcmx opened 2 years ago
I think one of the advantages of using Integer
wrapper class is that you can check if it is null
, whereas using int
primitive data type does not allow you to do that. But it still depends on your implementation wise.
We don't have any requirement/recommendations from the module administration or grading POV. But this is a good topic for discussion/sharing for you guys.
Good day everyone and prof. Is there a standard practice between using primitive types as compared to Wrapper classes in SWE codes. For instance using int and Integer. Are the two interchangeable as long the code works or should I be following a standard practice? Thanks in advance!