Java Hour HourNow()

Here you can find the source of HourNow()

Description

Hour Now

License

Open Source License

Declaration

static String HourNow() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;

public class Main {
    static String HourNow() {
        int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
        int min = Calendar.getInstance().get(Calendar.MINUTE);
        int sec = Calendar.getInstance().get(Calendar.SECOND);
        return "[" + hour + ":" + min + ":" + sec + "]";
    }/*from   w ww  .  j  av  a  2s.c  o m*/
}

Related

  1. getTicksTillHour()
  2. hour()
  3. hour()
  4. hourAgo()
  5. hourCompletion(boolean hourPresent, int hour, boolean minutePresent, int minute, boolean secondPresent, int second, boolean milliPresent, int milli, String choice)
  6. Hours()
  7. hours(int hours)
  8. hoursAndMinsToMilliseconds(int sign, int hours, int minutes)
  9. isHour(int hour)