Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to assign enumeration parameters in java
How to assign enumeration parameters in java
Public? Class? Main class? {

enum? Day? {

Monday? Tuesday? Wednesday? Thursday? Friday? Saturday? Sunday

}

Public? Static electricity Invalid? main(String[]? args)? {

Day? Yesterday? =? Day. Tuesday;

Day? Today? =? Day. Wednesday;

Day? Tomorrow? =? Day. Thursday;

Print (yesterday, today, tomorrow);

}

Static electricity Invalid? Print (day? Yesterday, what day? Today, a day? Tomorrow)

System.out.println ("Today? Is it? ”? +? Today);

System.out.println ("Tomorrow? Will. Is it? ”? +? Tomorrow);

System.out.println ("Yesterday? Was? ”? +? Yesterday);

}

}