How to make limitations for constructor values in java? [closed]
up vote
-4
down vote
favorite
What is the right way in java to limit constructor values? I want to make sure that its NOT possible to create objects using MyConstructor with the parameter int value > 5 example: (pseudo code) public MyConstructor(value){ if(value < 5){ this.value = value; } }
java
share | improve this question
edited Nov 15 at 10:10
asked Nov 11 at 13:50
QickdmG dombu
50 6
...