Homework: Compare Date Strings | I have one more extra line of code but I feel like I have the bare minimum

The given task is to compare two given Strings that contain dates in the Epoch form (?).

I start off with importing the Instant class.
Then in the method itself, in one line, I return a comparison of the two dates where I use the compareTo() method and the parse() method.

My total added number of lines with this solution is 2.

Yet, when I try to submit my work, I get the following error:

Your submission contains unexecuted code:
  You have 1 more lines of unexecuted code than the solution, which is more than the limit of 0.

Any ideas on what this error code specifically means?

Thanks in advance,

1 Like

I’m having same problem. They discuss this error in another thread located here but I can’t figure it out either as I believe we’ve arrived at the same solution…which is a single line. Maybe the discussion will help you figure it out. I also had trouble with the practice problem further up on this page did you get the solution there?

1 Like

Haha, yeah… Same problem there too.
My submission and their solution matched up character for character but still was counted as incorrect.

There are a few kinks left on this resource to iron out, but the course is still very helpful!

1 Like