Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.SimpleTimeZone;

public class Main {
    public static void main(String args[]) {
        // create two simple time zone object 
        SimpleTimeZone stobj1 = new SimpleTimeZone(820, "US");
        SimpleTimeZone stobj2 = new SimpleTimeZone(820, "GMT");

        // check rules for both objects
        boolean samerule = stobj1.hasSameRules(stobj2);

        // checking the value       
        System.out.println("Hash same rule : " + samerule);
    }
}