Why is the java compiler complaining about the first statement, it's because the expression () -> "" doesn't have a definite type, i mean it could be a Supplier <String> or a custom functional interface type, etc ... ?
Object emptyStringBuilder = () -> ""; // causes compiler error
Object emptyStringBuilder = (Supplier<String>)() -> "";
Could you elaborate on the exact causes please ?