How to create algorithm for digital clock(java).
Design/Create Algorithm
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Priyaranjan K SRank #45 · 32.5K reputationPosted Oct 9, 2015, 4:27 AM EDT
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 Gupta5 reputationPosted Oct 9, 2015, 4:40 AM EDT