fork(1) download
  1. import java.util.function.*;
  2.  
  3. class Ideone {
  4. public static void main (String[] args) {
  5. "foo".chars()
  6. .mapToObj(c -> (char) c)
  7. .filter(Predicate.not(Character::isAlphabetic))
  8. .toList();
  9. }
  10. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:7: error: incompatible types: inference variable T has incompatible bounds
        .filter(Predicate.not(Character::isAlphabetic))
        ^
    lower bounds: Integer,Object
    lower bounds: Character
  where T is a type-variable:
    T extends Object declared in method <T>not(Predicate<? super T>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
stdout
Standard output is empty