Android Time Get getTime()

Here you can find the source of getTime()

Description

get Time

Declaration

public static String getTime() 

Method Source Code

//package com.java2s;

import java.sql.Time;
import java.util.Calendar;

public class Main {
    public static String getTime() {
        Calendar c = Calendar.getInstance();
        int theHour = c.get(Calendar.HOUR_OF_DAY);
        int theMinute = c.get(Calendar.MINUTE);
        int theSecond = c.get(Calendar.SECOND);
        return (new Time(theHour, theMinute, theSecond)).toString();
    }/* w  w w .  j a v a2s  .  c  o m*/
}

Related

  1. nowAsTime()
  2. getCurrentTimeCalendar()
  3. getCurrentTimeStr()
  4. getCurrentTimeString()
  5. getTime()
  6. getCurrentlyDateTime()
  7. now()
  8. getTimeStamp()
  9. getTimeString(long time)