Click here to watch on Youtube:
https://www.youtube.com/watch?v=NtjZtfVExLE&list=UUhwKlOVR041tngjerWxVccw
Click the below Image to Enlarge:
TimeZoneDemo.java
Output
Refer:
docs.oracle.com/javase/8/docs/api/index.html?java/util/TimeZone.html
Click the below link to download the code:
https://sites.google.com/site/ramj2eev2/java_basics/TimeZoneDemo_Intro.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava_2018/TimeZoneDemo_Intro
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/5bada39e8532ab4b75aaa28b80cdcee21bf19ab7/BasicJava_2018/TimeZoneDemo_Intro/?at=master
See also:
All JavaEE Videos Playlist 
All JavaEE Videos 
All JAVA EE Links 
Spring Tutorial 
Servlets Tutorial 
All Design Patterns Links 
JDBC Tutorial 
Java Collection Framework Tutorial 
JAVA Tutorial 
Kids Tutorial 
Cooking Tutorial 
https://www.youtube.com/watch?v=NtjZtfVExLE&list=UUhwKlOVR041tngjerWxVccw
Click the below Image to Enlarge:
|  | 
| java.util.TimeZone class Introduction | Java Date and Time | 
TimeZoneDemo.java
import java.util.TimeZone;
public class TimeZoneDemo
{
public static void main(String[] args)
{
/*
* Returns: the default TimeZone
*/
TimeZone timeZone = TimeZone.getDefault();
System.out.println("timeZone = " + timeZone);
        
String displayName = timeZone.getDisplayName();
System.out.println("displayName = " + displayName);
}
}
public class TimeZoneDemo
{
public static void main(String[] args)
{
/*
* Returns: the default TimeZone
*/
TimeZone timeZone = TimeZone.getDefault();
System.out.println("timeZone = " + timeZone);
String displayName = timeZone.getDisplayName();
System.out.println("displayName = " + displayName);
}
}
Output
timeZone = sun.util.calendar.ZoneInfo[id="Asia/Calcutta",offset=19800000,dstSavings=0,useDaylight=false,transitions=6,lastRule=null]
displayName = India Standard Time
displayName = India Standard Time
Refer:
docs.oracle.com/javase/8/docs/api/index.html?java/util/TimeZone.html
Click the below link to download the code:
https://sites.google.com/site/ramj2eev2/java_basics/TimeZoneDemo_Intro.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava_2018/TimeZoneDemo_Intro
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/5bada39e8532ab4b75aaa28b80cdcee21bf19ab7/BasicJava_2018/TimeZoneDemo_Intro/?at=master
See also:
 


 
No comments:
Post a Comment