Никто не сталкивался с такой проблемой ??
Все вроде правильно написано, но не проходит проверку. А еще при запуске idea вылетает диалоговое окно с ошибкой плагина.
package com.javarush.task.pro.task13.task1317;
/*
Трансформируем enum в класс
*/
public class Month {
private int index;
private Month(int index) {
this.index = index;
}
private static final Month[] monthArray =
{JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER};
public static final Month JANUARY = new Month(0);
public static final Month FEBRUARY = new Month(1);
public static final Month MARCH = new Month(2);
public static final Month APRIL = new Month(3);
public static final Month MAY = new Month(4);
public static final Month JUNE = new Month(5);
public static final Month JULY = new Month(6);
public static final Month AUGUST = new Month(7);
public static final Month SEPTEMBER = new Month(8);
public static final Month OCTOBER = new Month(9);
public static final Month NOVEMBER = new Month(10);
public static final Month DECEMBER = new Month(11);
public static Month[] values(){
return monthArray;
}
public int ordinal(){
return this.index;
}
}