0

How to solve the time converter project in Java ?

Please indicate me what's wrong in the code. It's continuously showing me the error is ": expected". public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int days = scanner.nextInt(); //your code goes here int days = X; int seconds = int.class "X*24*60*60"; System.out.println(seconds); } }

6th Oct 2022, 5:03 AM
Rabi Shankar Panda
Rabi Shankar Panda - avatar
3 odpowiedzi
+ 3
what is int.class "x*24...."
6th Oct 2022, 5:40 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
Rabi Shankar Panda And what is 'X' and why it assigned to days if days is your input Why multiplication inside double quotes (" ") First learn why use double quotes (" ")
6th Oct 2022, 8:41 AM
A͢J
A͢J - avatar
0
If i don't add int.class then it shows "cannot find symbol". And to put location.
7th Oct 2022, 4:43 AM
Rabi Shankar Panda
Rabi Shankar Panda - avatar