Skip to main content

I need help creating a basic calendar. [New To Java]

5 replies [Last post]
inmate527
Offline
Joined: 2010-03-14

Can someone please help me get started? I'm not asking the good people at java.net to do the project for me but I need someone to guide me in the right direction. I understand basic java code like loops strings etc. Thanks in advance. :)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
RovaGeekox
Offline
Joined: 2014-03-13

Calendar calendar = Calendar.getInstance();

or

Calendar calendar = new GregorianCalendar();

robinzon
Offline
Joined: 2010-01-20

well you're not saying why you need it and how yer Calendar differs from for example GregorianCalendar (http://java.sun.com/j2se/1.5.0/docs/api/java/util/GregorianCalendar.html)

inmate527
Offline
Joined: 2010-03-14

Can someone please help me? I really want to learn how to do this? Am I not giving enough information?

walterln
Offline
Joined: 2007-04-17

You haven't actually said (or even decided) what you want your calendar to do. As long as you don't know that, there is nothing to code.

See also the links [url=http://forums.java.net/jive/thread.jspa?threadID=76154&tstart=0]in this thread[/url].

inmate527
Offline
Joined: 2010-03-14

I'm using eclipse as well. This is the progress that I've made.

package Calendar;

public class Calendar {

/**
* @param args
*/
public static void main(String[] args) {
//declare variables
int month = 0;
int day = 0;
int week = 0;
int year = 0;
int leapyear = 0;
//end variables

for(int i = month; i < 13; i++){
System.out.println( month + i);

}

}

}