4
यह जावा 8 लंबोदर संकलन करने में विफल क्यों है?
निम्नलिखित जावा कोड संकलित करने में विफल रहता है: @FunctionalInterface private interface BiConsumer<A, B> { void accept(A a, B b); } private static void takeBiConsumer(BiConsumer<String, String> bc) { } public static void main(String[] args) { takeBiConsumer((String s1, String s2) -> new String("hi")); // OK takeBiConsumer((String s1, String s2) -> "hi"); …