We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbe3b15 commit 5a8fc34Copy full SHA for 5a8fc34
DateAndTime.java
@@ -0,0 +1,13 @@
1
+import java.util.*;
2
+public class DateAndTime {
3
+ public static void main(String[] args)
4
+ {
5
+ Calendar now = Calendar.getInstance();
6
+ System.out.println();
7
+ System.out.println("Current full date and time is : " + (now.get(Calendar.MONTH) + 1) + "-"
8
+ + now.get(Calendar.DATE) + "-" + now.get(Calendar.YEAR) + " "
9
+ + now.get(Calendar.HOUR_OF_DAY) + ":" + now.get(Calendar.MINUTE) + ":"
10
+ + now.get(Calendar.SECOND) + "." + now.get(Calendar.MILLISECOND));
11
12
+ }
13
+}
0 commit comments