How to solve Time Converter in Java? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

How to solve Time Converter in Java?

I am not able to solve the Time Converter in java. If anyone knows then help me please.

8th Apr 2021, 11:45 AM
OM Wani
OM Wani - avatar
2 Answers
0
import java.io.*; import java.util.*; class Conversion { static void conversion(float hours) { float minutes, seconds; minutes = hours * 60; seconds = hours * 3600; Regards, Jimmy
1st Nov 2022, 6:22 AM
Jimmy Wick
Jimmy Wick - avatar
- 2
You need only one line of code. It starts with: System.out.println(...... And I think, you will be able to multiply the number of seconds for a given number of days?
8th Apr 2021, 11:59 AM
Coding Cat
Coding Cat - avatar