This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Here is an interface I am working on: public interface MultiLinearObject { public static final double MLO_DEFAULT_TOL = 1.0E-10; // arbitrary choice boolean isAlmostSmallerThan(MultiLinearObject arg, double tol); default boolean isAlmostSmallerThan(MultiLinearObject arg){ return isAlmostSmallerThan(arg, MLO_DEFAULT_TOL); } } The default method gets flagged as an error by NetBeans 8.0. The hint says: default methods are not supported in -source 1.7 (use -source 8 or higher to enable default methods) But, I am using 1.8, and have in fact uninstalled all earlier versions of Java. I googled on the error message and nothing came up.
Please check your project properties. What source level do you use? (Note that JDK 8 supports all previous source levels)
Works for me when using JDK8; hint reacts also to project property change (source level degraded from JDK8 to JDK7). Should the defect happen again, check your project properties. If really using JDK8 and an adequate source level, please zip your project directory (nbproject subdirectory in your sources) and attach here, and reopen the bug; thanks.
If you are using Maven you need to update the version in pom.xml also, check: <maven.compiler.source>X.X</maven.compiler.source> <maven.compiler.target>X.X</maven.compiler.target>
Just look at this
https://youtu.be/4Mn_-j9CEGE?list=PLZpM_c3qX4-hFkL4IgN-Oml0kRHeeAHFn