Thursday 15 November 2018

java.sql.Time class Introduction | Java Date and Time | Date and Time in java


Click here to watch on Youtube:
https://www.youtube.com/watch?v=z3TxceQxEIU&list=UUhwKlOVR041tngjerWxVccw

Click the below Image to Enlarge:

java.sql.Time class Introduction | Java Date and Time | Date and Time in java
TimeDemo.java

import java.sql.Time;

public class TimeDemo
{

    public static void main(String[] args)
    {

        long millis = System.currentTimeMillis();

        /*
         * Constructs a Time object using a milliseconds time value.
         */

        Time time = new Time(millis);
        System.out.println(time);
    }

}

Output

09:38:34

Refer: 
https://docs.oracle.com/javase/8/docs/api/index.html?java/sql/Time.html
 
Click the below link to download the code:
https://sites.google.com/site/ramj2eev2/java_basics/TimeDemo_Intro.zip?attredirects=0&d=1

Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava_2018/TimeDemo_Intro

Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/4cfac93378c4f9d33f18bb5083115d18778294de/BasicJava_2018/TimeDemo_Intro/?at=master

See also:

  • All JavaEE Videos Playlist
  • All JavaEE Videos
  • All JAVA EE Links
  • Spring Tutorial
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • Kids Tutorial
  • Cooking Tutorial
  • No comments:

    Post a Comment