Can I override toString method of functional interface? Or rephrase. Is there elegant way to change anonymous inner class that implements functional interface and overrides toString method with lambdas? Can I override toString when I create lamba expression in JDK8.
interface Iface {
void do();
}
main() {
Iface iface = () -> /*do something*/
System.out.println(iface); // I would like to see anything useful in output
}
Can I override toString for iface?