Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.TimeZone;

public class Main {
    public static void main(String args[]) {

        TimeZone timezoneone = TimeZone.getDefault();
        TimeZone timezonetwo = TimeZone.getDefault();

        // comparing two time zones
        boolean res = timezoneone.hasSameRules(timezonetwo);

        // checking the result   
        System.out.println("Comparison result:" + res);
    }
}