posted 20 years ago
I have some code in which I want to create a current date for today. Then I want to subtract 3 months worth of time. So for the day Feb 11, 2003 I would want the date to be Nov 11, 2002. Here's my first attempt:
I took a quick look at the add method for Calendar and I thought that this would work for me. This code seems to work fine for me, but my compiler flags the second line as accessing a static field in a non static way. I understand WHAT and WHY the compiler is telling me this. However, alternatives are not working for me. How can I do this the correct way? Thanks in advance.