How to create algorithm for digital clock(java).
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Priyaranjan K SPosted Oct 9, 2015, 8:27 AM
Step 2: Write applet code which should specify width and height of applet window.
Step 3: Create a class MyClock implement the interface runnable.
Step 4: Create an object for thread and start it.
Step 5: Create an object for class Calendar.
Step 6: Get hour, minute and seconds using that object and assign to variables.
Step 7: Print that variables for every second using sleep method.
Step 8: Compile and execute the program.
Guddu GuptaPosted Oct 9, 2015, 8:40 AM