ZoneOffset isSupported(TemporalField field)
checks if the specified field is supported.
isSupported
has the following syntax.
public boolean isSupported(TemporalField field)
The following example shows how to use isSupported
.
import java.time.ZoneOffset; import java.time.temporal.ChronoField; /*from www.j a v a 2s . c o m*/ public class Main { public static void main(String[] args) { ZoneOffset z = ZoneOffset.UTC; boolean t = z.isSupported(ChronoField.OFFSET_SECONDS); System.out.println(t); } }
The code above generates the following result.