Skip to content

Instantly share code, notes, and snippets.

Created Jan 5, 2014
What would you like to do?
javac br/com/casadocodigo/java8/
br/com/casadocodigo/java8/ error: variable comparator is already defined in method main(String[])
Comparator<Usuario> comparator =
br/com/casadocodigo/java8/ error: cannot find symbol
.thenComparing(s -> s.length());
symbol: method length()
location: variable s of type Object
br/com/casadocodigo/java8/ error: incompatible types: no instance(s) of type variable(s) U exist so that Comparator<Object> conforms to Comparator<String>
.thenComparing(s -> s.length());
where U,T are type-variables:
U extends Comparable<? super U> declared in method <U>thenComparing(Function<? super T,? extends U>)
T extends Object declared in interface Comparator
3 errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment