Thursday, July 9, 2009

Import java.util.*;import java.util.Calendar;public class DateDemo{public static void main(String ar?

please tell mee in detail abt the lines of code mainly


Calendar c=Calendar.getInstance(); wt is this n


int i=(int)c.get(Calendar.YEAR); this.........why we have to use


what does they mean

Import java.util.*;import java.util.Calendar;public class DateDemo{public static void main(String ar?
//create a new instance of calendar, of current time


Calendar c=Calendar.getInstance()





//is to get the Year from the calendar time.


int i=(int)c.get(Calendar.YEAR)





usually people use calendar than Date. check out the API for more details on calendar and date

email cards

No comments:

Post a Comment