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.util.Calendar;

import java.sql.Time;

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);
        //long time = c.get(Calendar.)
        return (new Time(theHour, theMinute, theSecond)).toString();
    }/*w w  w .ja v a2  s .c  o  m*/
}

Related

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