Bonsoir à tous ,
voici une interface :
et voici ma classe :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 public interface Triable<T> { public int tri(T elem); }
Pourtant lors de la compilation j'obtiens des erreurs :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 public class tri_exemple implements Triable<T> { public int tri(T elem) {return 1;} public static void main(String[] args) { ; } }
Je ne comprend pas ??
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 tri_exemple.java:8: cannot find symbol symbol: class T public class tri_exemple implements Triable<T> { ^ tri_exemple.java:9: cannot find symbol symbol : class T location: class tri_exemple public int tri(T elem) {;} ^ 2 errors
Partager