1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| public class Test {
private static Scanner scan;
public static void main(String[] args) {
LireFichier.lireDoc();
System.out.println("Veuillez choisir le type de graphique que vous voulez :");
clavier = new Scanner(System.in);
System.out.println("1-Représentation en courbe");
System.out.println("2-Représentation en rectangle ");
System.out.println("Votre choix : ");
int choix= clavier.nextInt(); //Erreur sur cette ligne : Exception in thread "main" java.util.NoSuchElementException
if (choix == 1){
Graph.dessinerCourbe();
}else if (choix == 2){
Graph.dessinerRectangle();
}
}
} |