anoterCode
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class JavaClasses {
|
||||
public static void main(String[] args) {
|
||||
Date date = new Date();
|
||||
SimpleDateFormat s = new SimpleDateFormat("dd/M/yyyy");
|
||||
SimpleDateFormat sd = new SimpleDateFormat("dd/M/yyyy hh:mm:ss");
|
||||
System.out.println(s.format(date));
|
||||
System.out.println(sd.format(date));
|
||||
System.out.println(date.toString());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user