title: Prevent Negative numbers for Age without using client side validation
body: <p>I have an issue in Core java.
  Consider the Employee class having an attribute called age.</p>
  
  <pre><code>class Employee{           
        private int age;     
        public void setAge(int age);     
  }
  </code></pre>
  
  <p>My question is how do i restrict/prevent setAge(int age) method such that it accepts only positive numbers and it should not allow negative numbers,</p>
  
  <p><code>Note: This has to be done without using client side validation.how do i achieve it using Java/server side Validation only.The validation for age attribute should be handled such that no exception is thrown</code>       </p>