Jump to content

Beginners calendar exercise

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
Jude

Jude

    Newbie

  • Members
  • Pip
  • 1 posts
I am an absolute beginner and need alot of help.
I have been set a task to display a calendar for any given month and year.
I made a start with a book but I cant get what I need from it.

So far I have used GregorianCalendar and I can display a calendar. I first thought it was todays date but it isn't it seems to be a random month and year. I need to be able to input a given month and year, and then display that.

I keep doing so much wrong with this I need alot of guidence but any help or advice would be appreciated. Thanks. :)

#2
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
Have you looked at the JavaDoc's for this class? GregorianCalendar (Java 2 Platform SE v1.4.2)

If you can ask a more specific question, I will be able to give you more guidance.

#3
gamers2000

gamers2000

    Newbie

  • Members
  • Pip
  • 3 posts
Sorry, what is it that you need help with?

Creating a GregorianCalendar with a given month and year?

If that is the case, the API shows the one constructor of GregorianCalendar as
GregorianCalendar(int year, int month, int date)

So, all you have to do is simply create a GregorianCalendar, passing in the year,month and if not needed, any date.

I suppose you know how to handle user input?