I've an interface with generic methods in it. I would like to have specialized methods in the sub types. While doing that I'm seeing the following warnings in eclipse. Appreciate if someone can clarify:
class Sorter { <E> void sort(E[] elements); }; class StringSorter { // This gives me a warning 'hiding' to 'sort' <String> void sort(String[] elements) { } // Gives me an error "The method someCrap(String[]) in the type StringSorter is not applicable for the arguments (String[])" void someCrap(String[] elements) { } };
I would like to understand why eclipse gives the above warnings and errors.
Regards,
-C