Java Now now()

Here you can find the source of now()

Description

now

License

Open Source License

Declaration

public static String now() 

Method Source Code

//package com.java2s;
// it under the terms of the GNU General Public License as published by

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    /**/* ww w . j  a  v a  2s .  com*/
     */
    public static String now() {
        String DATE_FORMAT = "dd.MM.yyyy HH:mm:ss";
        SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);

        Date date = new Date();

        return sdf.format(date);
    }
}

Related

  1. now()
  2. now()
  3. now()
  4. now()
  5. now()
  6. now(String dateFormat)
  7. now(String dateFormat)
  8. now(String dateFormat)
  9. now(String dateFormat)