I would like to create my own Time class which can accept the hour minute and second in the constructor. Then I want to be able to use a getCurrentTime() method and return the updated time (if the time was 12:00:00 when the object was created and a minute and 15 seconds have passed then it should return 12:01:15).
I would like to be able to implement this using the 12 and 24 hour clock. I know System.currentTimeMillis() can be used to calculate elapsed time in milliseconds, and I know that the swing package has a timer that might be useful.
Can anybody give me any pointers on the most efficient/ practical way to do this?
Use
java.util.Calendar. It will give you all tools you need for quick start.