title: Creating a Shoe object
body: <p>I cannot figure out why my code does not register that there is a max size on the object. I maybe thought it was due to the fact that the bottom variables may override the Minimum and maximum values but, it does not seem to help</p>
  
  <pre><code>public class Shoes {
  
  private static final int MIN_SIZE = 1;
  private static final int MAX_SIZE = 15;
  
  private String brand;
  private double price;
  private int size;
  
  public Shoes(String brand, double price, int size) {
     this.brand = brand;
     this.price = price;
     this.size = size;
  }
  
  public String getBrand() {
     return brand;
  }
  
  public void setBrand(String brand) {
     this.brand = brand;
  }
  
  public double getPrice() {
     return price;
  }
  
  public void setPrice(double price) {
     if (price &lt; 0) {
         System.out.println("Price Must be greater than zero!\n");
         return;
     }
     this.price = price;
  }
  
  public int getSize() {
     return size;
  }
  
  public void setSize(int size) {
     if (size &gt; MAX_SIZE &amp;&amp; size &lt; MIN_SIZE) {
         System.out.println("Invalid Size!\n");
  
     }
  
  }
  
  @Override
  public String toString() {
     return "Shoe [brand = " + brand + ", price = " + price + ", size = " +      size + "]";
  }
  
  public static void main(String[] args) {
  Shoes myShoes = new Shoes("J.F.", 45.99, 10);
  Shoes otherShoes = new Shoes("Addidas", 65.99, 16);
  
  System.out.println("The shoes: ");
  System.out.println(myShoes.toString());
  
  System.out.println("Other Shoes: ");
  System.out.println(otherShoes.toString());
  
     }
  }
  </code></pre>
  
  <p>The othershoes should register as an invalid size. however it just runs the code as normal and does not output the invalid size text at all I do not understand why.</p>