Some constants of TimeZone class.
1. TimeZone.LONG:
Syntax:
int java.util.TimeZone.LONG : 1 [0x1]
A style specifier for getDisplayName() indicating a long name, such as "Pacific Standard Time."
Approach
Java
import java.util.TimeZone;public class TimeZoneConstants {public static void main(String[] args) {System.out.println(TimeZone.LONG);}}
Output:
1
2. TimeZone.SHORT:
Syntax:
int java.util.TimeZone.SHORT : 0 [0x0]
A style specifier for getDisplayName() indicating a short name, such as "PST."
Approach
Java
import java.util.TimeZone;public class TimeZoneConstants {public static void main(String[] args) {System.out.println(TimeZone.SHORT);}}
Output:
0
No comments:
Post a Comment