Duration ZERO example
Description
Duration ZERO
Constant for a duration of zero.
Syntax
ZERO
has the following syntax.
public static final Duration ZERO
Example
The following example shows how to use ZERO
.
import java.time.Duration;
//from www .j av a2s .c o m
public class Main {
public static void main(String[] args) {
Duration duration = Duration.ZERO;
System.out.println(duration);
}
}
The code above generates the following result.