SHARE
TWEET

Java Months

DulcetAirman Apr 15th, 2016 (edited) 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package ch.fhnw.claudemartin;
  2.  
  3. import java.time.Month;
  4. import java.time.format.TextStyle;
  5. import java.util.EnumSet;
  6. import java.util.Locale;
  7.  
  8. public class SomeClass {
  9.  
  10.   public static void main(final String[] args) {
  11.     final EnumSet<Month> months = EnumSet.allOf(Month.class);
  12.  
  13.     final Locale locale = Locale.FRENCH;
  14.     for (final Month month : months) {
  15.       System.out.println(month.getDisplayName(TextStyle.FULL, locale));
  16.     }
  17.   }
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top