Getting current datetime using Calendar.getInstance() vs new GregorianCalendar()?

Looking in the source of Calendar.getInstance().

Looking in the source of Calendar.getInstance(): private static Calendar createCalendar(TimeZone zone, Locale aLocale) { // If the specified locale is a Thai locale, returns a BuddhistCalendar // instance. If ("th". Equals(aLocale.getLanguage()) && ("TH".

Equals(aLocale.getCountry()))) { return new sun.util. BuddhistCalendar(zone, aLocale); } else if ("JP". Equals(aLocale.getVariant()) && "JP".

Equals(aLocale.getCountry()) && "ja". Equals(aLocale.getLanguage())) { return new JapaneseImperialCalendar(zone, aLocale); } // else create the default calendar return new GregorianCalendar(zone, aLocale); } So getInstance() will return a Calendar based on your default Locale and TimeZone.

Calendar.getInstance() will give you a Calendar using the default time zone and locale, which can result in a GregorianCalendar, a BuddhistCalendar, or a JapaneseImperialCalendar. GregorianCalendar will always give you, well, a Gregorian calendar.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions