+ 2
Please how can I convert scanner into in java ?;
if I try int x = new Scanner (System.in) I keep on getting (Scanner cannot be converted to Int ) error
2 odpowiedzi
+ 3
Scanner x = new Scanner(System.in);
After, use:
x.nextInt();
or x.nextLine();
or x.nextDouble();
etc.
to get the value the user entered.
+ 3
thanks a lot for the answer I found a way and I used it in this code as an example
https://code.sololearn.com/c9b9TFPD06qY/#