title: Stop decrementing to negative values when the value of a variable becomes zero
body: <p>This below code has Two values increment and decrement which are hooked to buttons in XML</p>
  
  <pre><code>int quantity = 0;;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_trial_order);
  }
  
  public void increment(View view){
     quantity = quantity + 1;
      display(quantity);
  }
  public void decrement(View view){
      quantity = quantity - 1;
      display(quantity);
  }
  </code></pre>
  
  <p>and increment works fine,decrement works fine too but when I press decrement it goes in 0,-1,-2,-3 and so on but I want 0 to be the final value when I use decrement button kindly help</p>