Say I have a method:
public void method(int i) {
this.value =+ i;
}
How can I restrict i to a value greater than x? I understand this can be done outside the method but I would prefer to condition it in the constructor. Would it be something like:
public void method(int i; i > x){...};
Sorry for not testing this myself, I came up with it as I wrote my query.