title: How to make objects of an enum in java
body: <p>I am trying to define three different objects of enum class "Item" with weights between 0 and 20 and description of each item </p>
  
  <p>Here is my code :</p>
  
  <pre><code>public enum Item
  {
      // Three Items with descriptions
      GOLD (2, "gold"), SILVER(12, "silver"), BRONZE(5, "bronze");
  
      private int weight;
      private String description;
  
      public int getWeight()
      {
         return weight;
      }
  
      public String toString()
      {
          return description;
      }
  
  }
  </code></pre>
  
  <p>I keep getting this error </p>
  
  <blockquote>
    <p>constructor Item in enum Item cannot be applied to given types: required: no arguments, found:int.java.lang.String, reason: actual and formal argument lists differ in length </p>
  </blockquote>
  
  <p>Also </p>
  
  <blockquote>
    <p>The operator that you use here cannot be used for the type of value that you are using it for. You either using the wrong type here, or the wrong operator</p>
  </blockquote>