Calendar c = Calendar.getInstance();
c.set(2017, Calendar.OCTOBER, 29);
This code behave as a Gregorian calendar, but if the returned Calendar subclass is a Islamic, Julian, Buddistic or Hebrew calendar, then the month called October or the year 2017, doesn’t exist. Calendar.getInstance() uses the current default locale to select an appropiate implementation. The utility of Calendar.getInstance() is very limited and it should be avoided because it’s results is not properly defined.
Calendar c = new GregorianCalendar (timeZone);
c.set(2017, Calendar.OCTOBER, 29);
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.





















