get Second from java.sql.Time - Java java.sql

Java examples for java.sql:Time

Description

get Second from java.sql.Time

Demo Code


//package com.java2s;
import java.sql.Time;

import java.time.LocalTime;

public class Main {
    public static int getSecond(Time time) {
        LocalTime localTime = time.toLocalTime();

        return localTime.getSecond();
    }//from ww  w . j  a  v  a 2 s .  c  om
}

Related Tutorials