In this example given below, we will learn how to read character from keyboard and display on standard output device. Method System.in.read() read character from keyboard and returns integer value of the character so we need to change type to char.
Get Time Stamp
In the example given below we will learn how to display current time. getTime() method returns the number of milliseconds represented by Date object that will be used as argument to create object of java.sql.Time class.