User Comments for the tutorial:

Getting the Current Time

Total comments: 5      View Tutorial    Discuss: Getting the Current Time



Have a problem?
This code i have learnt and applied in my project but its nt getting the system time. When i run it ordinary it got the sys time but when i applied it on a gui it didnt work. This is a thread. public void dateTime() { datetimeThread = 

System date and time using multithreading
import java.util.*; import java.lang.String.*; import java.util.Date.*; class DateTimeThread extends Thread{ /*public void start() { System.out.println("\nIN RUN"); datetimeThread = new Thread(this); datetimeThread.start(); }*/ 

timer for scheduling activity
I want to start an activity with am of another after the end of the execution time of the first one. can you help me please 

Very helpful
thanks i was trying to find out how to do this and not just print out the simple format like other sites give. 

No This is NOT!!
My system timezone is +3:30 But I add to my time +1 hour.(+4:30) I tested this code (int hour = calendar.get(Calendar.HOUR);) but this code return what is matched by +3:30. 

Related Tutorial and Articles