When speaking about Java-8 you may use the word "function" to refer to the functional interface (interface with single abstract method), the class implementing such interface or the expression of the functional interface type (including lambda expression or method reference). You should not however call methods as functions. This become even more important than in previous Java versions as if you see the word "function" in Java-7 related discussion, you can assume that the "method" was meant. But in Java-8 people may think that you are speaking about functional interface, not about method.
So it's ok to say:
The Stream.map
method accepts a function as a parameter.
Or
A Collector
interface aggregates four functions: supplier, accumulator, combiner and finisher.
Or
I pass the Objects::nonNull
function to the Stream.filter
method.
But the following would sound confusing:
I get a strange exception when I use Math.sqrt
function.