Skip to content

julien-diener/MethodReference

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MethodReference

Simple example of using method reference with Java 8

The Application.main creates a FirstClass and a SecondClass instances, then call the second.applyFunction with the method first.addPrefix as argument.

Here java.util.function.Function is used as function-type argument: a function with one generic argument and a generic output. Look at java.util.function for other function-type:

http://docs.oracle.com/javase/8/docs/api/java/util/function/package-summary.html

About

Simple example of using method reference with Java 8

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages