Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Current date and time in java
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; import java.text.*; class Rextester { public static void main(String args[]) { // SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy, HH:mm:ss"); // String currentDateandTime = sdf.format(new Date()); String mydate = DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime()); System.out.println("Hello, World! ="+mydate); } }
run
|
edit
|
history
|
help
0
1
191fa07050(1(D))
test no.1
Meena
Task2
Strings with same letters with reps
Java
1
Find merge point of two linkedlists - solution 1
Has A