Match kinds of method references

Report a typo

Match different kinds of method references with the suitable examples.

All examples are based on the class String and an instance of the class named str.

Match the items from left and right columns
Reference to a constructor
Reference to a static method
Reference to an instance (non-static) method of an existing object
Reference to an instance method of an object of a particular type
str::contains
String::new
String::contains
String::valueOf
___

Create a free account to access the full topic