Finding Time Difference| Java Interview Question | Java Coding Question | Subscriber's Questions

Publié le: 19 avril 2021
sur la chaîne: Arun Videos
134
2

You are given the current time R in the HH:MM:SS format.You are
also given N more time values in an array P, where every element
P[i] is less than or equal to R.

Write a program to calculate the time difference between P[i] and R
and print one of the following messages accordingly.
. If the time difference is zero,print now.
. If the time difference is in seconds but less than a minute,print X
seconds ago.
. If the time difference is in minutes but less than an hour,print X
minutes ago.Ignore the seconds part of the difference.

. If the time difference is in hours,print X hours ago.
Ignore the minutes and seconds part of the difference.

. If the value of X is 1, print the word second instead of seconds,
hour instead of hours and minute instead of minutes.


Sur cette page du site, vous pouvez voir la vidéo en ligne Finding Time Difference| Java Interview Question | Java Coding Question | Subscriber's Questions durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Arun Videos 19 avril 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 134 fois et il a aimé 2 téléspectateurs. Bon visionnage!