Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gregorian and Calender class

Status
Not open for further replies.

satellite03

IS-IT--Management
Dec 26, 2003
248
IN
there are 2 calender in Java . Gregorian and Calender class.
i am confused which one to use. could you tell ?
 
Calender is an abstract class, GegorianCalender is a solid implementation of Calender - its called Object Orientated design :p

--------------------------------------------------
Free Database Connection Pooling Software
 
[blue]which one is good between this two ?[/blue]

Code:
Calender c=Calender.getInstance();
//  start working with c


		OR


GregorialCalender gc=new GregorialCalender();
// start working with gc
e
 
In most areas of the world, Calendar.getInstance() will return you a GregorianCalendar instance. This method is locale-sensitive. Obviously creating a GregorianCalendar instance directly may not be portable world-wide.

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top