salut;
j'ai fait un code en java, le problème ce que je sais pas pourquoi il m'affiche un message d'erreur: The method nextInt() is undefined for the type Scanner
voici le code:
j'attends vos aides, merci d'avance
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 import com.sun.java_cup.internal.runtime.Scanner; import java.util.*; public class test { public static void main(String[] args) { int nombreEntier; System.out.println("Rentrez un nombre positif ou nul :"); Scanner lectureClavier = new Scanner(System.in); nombreEntier = lectureClavier.nextInt(); } }
Partager