#Java, Lambda expressions

5 messages · Page 1 of 1 (latest)

storm echo
#

My question is regarding lambda expressions. See the photo.

In this case doing p2-p1 gives me it in descending order. How do I know which does which. As in which of p1 and p2 is bigger or whatever

full fossilBOT
#

This post has been reserved for your question.

Hey @storm echo! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

tepid oyster
#

Comparison in Java works like this:
if the comparator returns 0, the objects are equal
If it returns a positive number, the first object is considered greater than the second
If it returns a negative number, the first object is considered less than the second