+ 1
Hi everyone, I'm new in programming , i don't know how to use scanner in java and write it's code?
I should write a program which converts days to seconds. The given code gives the amount of days as input!
1 Réponse
0
Import Scanner class which comes in util package
Make an object of Scanner class and then read input.
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();