Help with Java, I'm a begginer!!! | Sololearn: Learn to code for FREE!


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

import java.util.Scanner; class Program { public static void main(String[] args) { Scanner ent = new Scanner(; 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"!!!

9/8/2018 9:53:38 PM

Yisney Soto

2 Answers

New Answer


"int nent = ent.nextLine();" in "nextLine()" must be "nextInt()" for integers, if you want only numbers in your user input.


Thank you guys