I am getting the following error when I try to build my Java 1.8 project:
COMPILATION ERROR :
-------------------------------------------------------------
error: incompatible types: Path is not a functional interface
1 error
There is no line number associated with the error, but Netbeans is showing the red squiggly line under the package declaration for one of the classes in the project. That class doesn't even use Path though. It extends an abstract class in the same package that does use Path, if that's relevant.
Has anyone seen this before? Any thoughts on how to fix this?
Functional interface has a "single abstract method" (SAM). Maybe you are attempting to use Path in a way that requires it be SAM (e.g. as a lambda), but Path isn't SAM. https://dzone.com/articles/introduction-functional-1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With