1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
/* Java Date example. This Java Date example describes how Java Date class is being used in Java language. */ import java.util.*; /* Most of the methods of the Java Date class have been depricated. Java Calendar class should be used for date manipulation instead. */ public class JavaDateExample{ public static void main(String args[]){ /* Create date object with current date and time. */ Date date = new Date(); System.out.println("Today is " + date); } } /* OUTPUT of the above given Java Date Example would be : Today is Sat Feb 04 18:10:21 IST 2005 */ |
Add Comment