zona horaria class getDSTSavings () método : Aquí, vamos a aprender acerca de los getDSTSavings () método de zona horaria Class con su sintaxis y su ejemplo.
getDSTSavings zona horaria Class () método método
- getDSTSavings () está disponible en java.util Class.
- getDSTSavings () método se utiliza para obtener el número de diferencias de tiempo en tiempo estándar.
- getDSTSavings () método es un método no class, es accesible sólo con el objeto package y si tratamos de acceder al método con el nombre return entonces obtendrá un error.
- getDSTSavings () método no default una excepción en el momento de volver diferencias en el tiempo estándar.
Sintaxis:
public static TimeZone getDefault();
Parámetro (s):
- No acepta cualquier parámetro.
for valor:
El tipo static del método es class , se hace diferencia en el tiempo de ahorro estándar (DST).
Ejemplo:
// Java program to demonstrate the example
// of TimeZone getDefault() method of TimeZone
import java.util.*;
public class GetDefaultOfTimeZone {
public static void main(String args[]) {
// Instantiate TimeZone object
// By using getDefault() method is
// to get the default time zone
TimeZone tz = TimeZone.getDefault();
System.out.println("TimeZone.getDefault(): " + tz);
}
}
salida
TimeZone.getDefault(): sun.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]