I'm doing an assignment in Java
where I'm supposed to use the enumeration
type MONTH
that I've imported in my project. My teacher has written that "There is a special function that will convert a number to it's month:
Month.month(8)
".
I've written Month month = Month.month(4);
(where the variable month should have the value april), but it says that
"the method month is undefined for the type month".
As I understand it, Java
interprets the "Month" after the equal sign as a data/enumeration type, but I want it to be the class from which I use the function month
(they both have the name Month
). My classmates has used it without a problem and as far as I can see I've imported my teachers code correctly.
Eternally grateful for any help.