+ 1

What's wrong with my code?

import java.util.Scanner; class MyClass { public static void main(String[ ] args) { Scanner myVar = new Scanner(System.in); int num = myVar.nextInt(); System.out.print(num); } }

11th Jun 2018, 5:25 PM
sherlockholmes
sherlockholmes - avatar
4 Respostas
+ 9
Nothing, it works. Which result did you expect? What makes you think there's something wrong?
11th Jun 2018, 7:48 PM
Tashi N
Tashi N - avatar
0
i'm try to run that codes in another apps and got error
11th Jun 2018, 10:09 PM
sherlockholmes
sherlockholmes - avatar
0
Can you give us the output?
11th Jun 2018, 10:28 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
0
it's fixed. i do wrong in package name. thanks
11th Jun 2018, 10:39 PM
sherlockholmes
sherlockholmes - avatar