- import java.util.Calendar;
- import java.util.GregorianCalendar;
- /**
- *
- * @author 张耀军
- */
- public class Test1 {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- // TODO code application logic here
- Calendar rightNow=new GregorianCalendar();
- rightNow.set(2015,01, 01);在这里我输入2015,01, 01,输出的结果为什么是32啊,不是应该是1吗?
- int date=rightNow.get(Calendar.DAY_OF_YEAR);
- System.out.println(date);
-
- }
-
-
-
-
- }
复制代码 |
|