java code to get the current date, month, year
java.util.Calendar cal = new java.util.GregorianCalendar();
System.out.println("Current Date : "+cal.get( Calendar.DATE ));
System.out.println("Current MONTH : "+cal.get( Calendar.MONTH ));
System.out.println("Current YEAR : "+cal.get( Calendar.YEAR ));
System.out.println("Current MONTH : "+cal.get( Calendar.MONTH ));
System.out.println("Current YEAR : "+cal.get( Calendar.YEAR ));
No comments:
Post a Comment