0

Help with Java, I'm a begginer!!!

import java.util.Scanner; class Program { public static void main(String[] args) { Scanner ent = new Scanner(System.in); System.out.println ("Ingresa un nĂșmero entero:"); Int nent = ent.nextline (); System.out.println(nent); } } I can't find the mistake... It supposed to be at 8 line HELP"!!!

8th Sep 2018, 9:53 PM
Yisney Soto
Yisney Soto - avatar
2 Answers
0
"int nent = ent.nextLine();" in "nextLine()" must be "nextInt()" for integers, if you want only numbers in your user input.
8th Sep 2018, 9:59 PM
JLMSC
JLMSC - avatar
0
Thank you guys
8th Sep 2018, 10:02 PM
Yisney Soto
Yisney Soto - avatar