You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
340 B
Java
10 lines
340 B
Java
5 years ago
|
import java.text.SimpleDateFormat;
|
||
|
import java.util.Date;
|
||
|
public class Main {
|
||
|
public static void main(String[] args) {
|
||
|
Date date = new Date();
|
||
|
String strDateFormat = "HH:mm:ss a";
|
||
|
SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
|
||
|
System.out.println(sdf.format(date));
|
||
|
}
|
||
|
}
|