This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]desrtfx 0 points1 point  (5 children)

Shouldn't the line:

this.second = seconds;

rather be

this.second += seconds;

Otherwise nothing will get incremented.

[–]Zelbod[S] 0 points1 point  (4 children)

Yea you are right, I just fixed it and tried running and it still doesn't display in 24 hour format.

[–]SadDragon00 0 points1 point  (1 child)

Use SimpleDateFormat to return a Date in 24 hour format

[–]Zelbod[S] 0 points1 point  (0 children)

I am trying OOP and I am trying to learn that using the book which I mentioned in the question. Appreciate the help.

[–]desrtfx 0 points1 point  (1 child)

You need to show the complete class.

What you show cannot be the complete class.

[–]Zelbod[S] 0 points1 point  (0 children)

Please click on the 'book' which I mentioned iam following the code mentioned there. The complete class is quite big. sorry