I want to set a couple of dates on Calendars and do a couple of very simple things with them, but I can't even seem to set a date.
I have this:
"package pointscalculator;
import java.util.*;
public class Week {
Calendar startDate = Calendar.getInstance();
startDate.set(2012,6,21,0,0);
...[other code]......"
Netbeans reckons that this is illegal, but in both the books I have this should work.
The Netbeans error:
"package startDate does not exist
<identifier> expected
illegal start of type"
I can't work out what I've done wrong. Or has my Netbeans spazzed out in some crappy way?