Hello,
I must convert a number of seconds in days, hours, minutes, seconds. I have a problem in the data format in java.
Here is my code
This is not working, how can I perform the task? Any help will be great for me?Code:Public class Clock { Public static void hand(String[] args) { int ul = 100; String seconds; try { System.out.System.out.println( "Enter a time in seconds to convert" ); read = System.in.read(); } catch ( Exception e ) { e.printStackTrace(); } / / SimpleDateFormat sdf (read) by int seconds in days hh mm ss / / SDF format for the seconds SimpleDateFormat fmat = new SimpleDateFormat ("HH: mm: ss"); String fmat = formatteddate.format(read); System.out.System.out.println( "it gives" + Formatteddate ); } }
Bookmarks