0
How would I input an int value in Java?
I am beginner so I dont know much about the Scanner way
1 Answer
+ 2
You can use scanner class to take input
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
Like this u can take an integer input.
don't forget to import the util package and it's scanner class