OOP2018 / guessing-game-SupalukBenz

guessing-game-SupalukBenz created by GitHub Classroom
0 stars 0 forks source link

Use primitive instead of Wrapper class #7

Closed kykungz closed 6 years ago

kykungz commented 6 years ago

max and min should be an int, not Integer. These two types are interchangeable but Integer is an object which consumes more memory space than an int which is primitive. https://github.com/OOP2018/guessing-game-SupalukBenz/blob/4751f8f9d199f4406408789e256052ffbca1ac5b/src/GameSolver.java#L20-L21 What you are using (Integer) is an example of a Wrapper class, which has its own use case. See Java wrapper class for more information.