Message d'erreur 'can not find symbol'
Bonjour,
Ce code ne fonctionne pas. Pourriez vous me dire ce qui cloche? Merci
***fichier livre.java***
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| import java.lang.*;
public class livre {
int numLivre;
String titre;
String auteur;
public void livre(int nliv, String titr, String aut) {
this.numLivre=nliv;
this.titre=titr;
this.auteur=aut;
}
public String ToString() {
return "Le numero "+numLivre+" correspond a "+titre+" avec comme auteur "+auteur;
}
} |
***fichier Main.java***
Code:
1 2 3 4 5 6 7 8 9 10
| package gadherent;
import java.lang.*;
public class Main {
public static void main(String[] args) {
livre leliv = new livre(13, "mon prog", "ETEME");
System.out.println(leliv.ToString());
}
} |