I’m using eclipse pulsar under java vm 1.6 . the problem is java.util Calendar class add method raises an error “The method add(int, int) is undefined for the type Calendar” but its fine as per the documentation.
package caltest;
import java.util.Calendar;
import java.util.Date;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
public class caltest extends MIDlet {
public caltest() {
// TODO Auto-generated constructor stub
}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
// TODO Auto-generated method stub
}
protected void pauseApp() {
// TODO Auto-generated method stub
}
protected void startApp() throws MIDletStateChangeException {
// TODO Auto-generated method stub
Calendar cal=Calendar.getInstance();
cal.setTime(new Date());
cal.add(Calendar.DAY_OF_MONTH, -5);
}
}
How about this?
or
?