Somebody please run this piece of code. And tell me why the Day of the Week is
coming wrong:
import java.util.Calendar;
public class DateCalculation {
public static void main(
String [] args){
Calendar startCal = Calendar.getInstance();
startCal.set(2004-1900,3-1,31); //for today (31/03/2004)
System.out.println("The day is : "+startCal.get(Calendar.DAY_OF_WEEK));
System.out.println("The date id : "+startCal.getTime());
}
}
[ March 31, 2004: Message edited by: Xon Bhuyan ]