• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about GregorianCalendar class  RSS feed

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

If I create a GregorianCalendar object like that:

GregorianCalendar date = new GregorianCalendar();

Are we sure that date contains the today date?
if not, how could we force the created object to contain the today date?

Best Regards
 
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public GregorianCalendar() constructs a default GregorianCalendar using the current time in the default time zone with the default locale.
 
You've gotta fight it! Don't give in! Read this tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!