. Advertisement .
..3..
. Advertisement .
..4..
I’m looking to reset my program’s time. Anyone know of a way to Get Current Time In Seconds on Java? If there’s an example, that’s great!
import java.time.LocalTime;
Here is specific example:
import java.time.LocalTime;
public class UsingLocalDate
{
public static void main(String[] args)
{
System.out.println(LocalTime.now());
// hr : min : sec.fimto sec
}
I used this way to Get Current Time In Seconds
In case you expect more than one maximum this will work
One of the basic solutions