Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.text.DateFormat;
- import java.text.SimpleDateFormat;
- import java.util.Date;
- public class NewClass1 {
- public static void main(String[] args){
- Date date = new Date();
- DateFormat dateformat = new SimpleDateFormat("dd/MM/YYYY");
- String currentDate = dateformat.format(date);
- System.out.println(currentDate);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment