Skip to content

[Web]: Clarification in https://dev.java/learn/lambdas/writing-comparators/ #53

Description

@fjbaldon

What happened?

In the section Implementing a Comparator with a Lambda Expression. it says:

You may have noticed that this lambda expression can also be written with a very nice bound method reference in that way:
Comparator<Integer> comparator = Integer::compare;

I think the Integer.compare() method is not bound on an object but rather is a class method of Integer reference type. I'm not sure if I'm correct.

What OS are you seeing the problem on?

Linux

What browsers are you seeing the problem on?

Chrome

Contact Details (optional)

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions