advancedJava 8 & Streams309 of 436
Is a given interface with equals(), toString(), and a default method still a valid @FunctionalInterface? Explain why.
Tests whether you know the single-abstract-method rule only counts methods that aren't already implementations of java.lang.Object's public methods -- redeclaring equals()/toString() as abstract doesn't add a second SAM, and default methods never count as abstract, so the interface is still a valid functional interface.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response