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.
Here is the code:
public class GetTimeStamp {
|
Output will be displayed as:

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Get Time Stamp
Post your Comment