0

I want to take two input in the format hh:mm:ss and compare them. However, all the problems I've looked at have used date or are too advanced for me. Will appreciate a simpler solution.

P.S: I'm a beginner

Ole V.V.
  • 65,573
  • 11
  • 96
  • 117
Kyčor
  • 1
  • 3
  • 1
    What have you tried? Show your code, please. – Héctor Mar 06 '18 at 11:40
  • 5
    if they are too advanced, continue learning the basics until they are not. don't skip chapters to "get ahead faster", you'll just end yourself up in "I don't understand any of this" situations faster – Stultuske Mar 06 '18 at 11:40
  • The accepted answer to the linked question is not that advanced IMHO. You can leave out the `DateTimeFormatter.ofPattern("HH:mm:ss")`. The hack is to compare your input strings directly using `equals` or `compareTo`, but the latter is a bit advanced in that you need to interpret the `int` it returns in order to determine which of the times comes first. – Ole V.V. Mar 06 '18 at 12:26

0 Answers0