Click here to watch on Youtube : 
https://www.youtube.com/watch?v=fKBOfhTv8xg&list=UUhwKlOVR041tngjerWxVccw
ZoneIdDemo.java
Output
Click the below link to download the code:
https://sites.google.com/site/ramj2eev1/home/javabasics/ZoneIdDemo_getId.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/ZoneIdDemo_getId
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/4bf907c20b634049430aea37cca3f8775ef090f9/BasicJava/ZoneIdDemo_getId/?at=master
See also:
All JavaEE Videos Playlist 
All JavaEE Videos 
All JAVA EE Links 
Servlets Tutorial 
All Design Patterns Links 
JDBC Tutorial 
Java Collection Framework Tutorial 
JAVA Tutorial 
Kids Tutorial 
https://www.youtube.com/watch?v=fKBOfhTv8xg&list=UUhwKlOVR041tngjerWxVccw
ZoneIdDemo.java
import java.time.ZoneId;
public class ZoneIdDemo
{
public static void main(String[] args)
{
/*
* Returns:the zone ID, not null
*/
ZoneId zoneId = ZoneId.systemDefault();
/*
* Returns:the time-zone unique ID, not null
*/
String strZoneId = zoneId.getId();
System.out.println(strZoneId);
}
}
public class ZoneIdDemo
{
public static void main(String[] args)
{
/*
* Returns:the zone ID, not null
*/
ZoneId zoneId = ZoneId.systemDefault();
/*
* Returns:the time-zone unique ID, not null
*/
String strZoneId = zoneId.getId();
System.out.println(strZoneId);
}
}
Output
Asia/Calcutta
Click the below link to download the code:
https://sites.google.com/site/ramj2eev1/home/javabasics/ZoneIdDemo_getId.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/ZoneIdDemo_getId
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/4bf907c20b634049430aea37cca3f8775ef090f9/BasicJava/ZoneIdDemo_getId/?at=master
See also:
 


 
No comments:
Post a Comment