Normal
Wieso meldet der Compiler bei x > y einen Fehler? Es sagt "cannot Applied to T T". Ich verstehe das nicht genau.[CODE]public final class Algorithm { public static <T> T max(T x, T y) { return x > y ? x : y; }}[/CODE]
Wieso meldet der Compiler bei x > y einen Fehler? Es sagt "cannot Applied to T T". Ich verstehe das nicht genau.
[CODE]public final class Algorithm {
public static <T> T max(T x, T y) {
return x > y ? x : y;
}
[/CODE]