title: Private members in Enum Java
body: <pre><code>public class Test {
  
      public static enum MyEnum {
          valueA(1),valueb(2),valuec(3),valued(4);
          private int i;
          private Object o;
  
          private MyEnum(int number) {
               i = number;
          }
  
          public void set(Object o) {
              this.o = o;
          }
  
          public Object get() {
              return o;
          }
  
  
       } 
  
      public static void main(String[] args) {
          System.out.println(MyEnum.valueA.i); // private
      }
  }
  </code></pre>
  
  <p>output: 1</p>
  
  <p>Why 1 is shown if it a private member in enum?</p>