Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.annotation.SuppressLint;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    @SuppressLint("SimpleDateFormat")
    public static String time_string(long time_seconds) {
        SimpleDateFormat sdf = new SimpleDateFormat();
        sdf.applyPattern("HH:mm");
        return sdf.format(new Date(time_seconds * 1000));
    }
}