mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-03 06:39:33 +07:00
GitOrigin-RevId: 6a6ccf257b953c9ab55cc3b46700a236694f1bd3
15 lines
395 B
Java
15 lines
395 B
Java
class Main {
|
|
private static final <X extends Integer, Y extends X> void add(X x, Y y) {
|
|
System.out.println(x + y);
|
|
}
|
|
|
|
private static <X extends String, Y extends X> void concat(X x, Y y) {
|
|
System.out.println(<error descr="Operator '+' cannot be applied to 'X', 'Y'">x+y</error>);
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
add(10, 20);
|
|
concat("Hello", "World");
|
|
}
|
|
}
|