I forgot a concept that I used and can't remember it.
For the context, I used to have a method like toString()
which had a parameter. This parameters allowed me to call my method like myMethod(System.out::println)
to print it on the screen, but also to print it in a file with the same syntax.
Does anyone know what can be this parameter? the concept? I think it's kind of a FunctionalInterface but I don't know what it is.