package com.misc;
public class EnumTest {
enum ColorPoint{
Red(1,1),
Blue(2,2);
private int x;
private final int y;
ColorPoint(int x, int y){
this.x = x;
this.y = y;
}
}
public static void main(String[] args){
for (ColorPoint cp : ColorPoint.values()) {
cp.x = 9;
System.out.println(cp);
System.out.println(cp.x);
}
}
}