Hi guys and girls.
I’m a bit of a newbie and I hope I haven’t posted in the wrong thread but I need a little help. I am trying to mess about with Greg calendar. I have been told to make a diary app and was hoping to use this as not to clog everything up with strings, that and we need to implement the deletion of past appointments and stop overlapping so I need calendar. Only problem is we haven’t learnt it yet and I'm ripping out what little help I have. If I post some code can someone at least tell me why it’s on about a return statement? I know this code runs with strings but not with this int business. The other thing is where I declare what the year month day date and so forth. If I swap these variables round can I get the date to display differently? Cheers peeps the code is below.
import java.text.DateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.TimeZone;
public class Time
{
private int year;
private int month;
private int day;
private int hour;
private int minute;
//Constructor creates a Time initialised to parameters
public GregorianCalendar Calender(int y, int m, int d, int h, int mi)
{
year=y;
month=m;
day=d;
hour=h;
minute=mi;
}
public int getMonth() {
return month;
}
}