Java Time Now getNowTime()

Here you can find the source of getNowTime()

Description

get Now Time

License

Open Source License

Declaration

public static String getNowTime() 

Method Source Code


//package com.java2s;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Locale;

public class Main {
    private final static Calendar nowCalendar = Calendar.getInstance();

    public static String getNowTime() {
        SimpleDateFormat dateFormat = new SimpleDateFormat("a hh:mm:ss ", Locale.CHINA);
        dateFormat.setCalendar(nowCalendar);
        return dateFormat.format(nowCalendar.getTime());
    }//  www . jav  a 2  s . c  o m
}

Related

  1. getNowString(String pattern)
  2. getNowTime()
  3. getNowTime()
  4. getNowTime()
  5. getnowTime()
  6. getNowTime()
  7. getNowTime()
  8. getNowTime()
  9. getNowTime()