Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Calendar;
import java.util.SimpleTimeZone;

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

        SimpleTimeZone stobj = new SimpleTimeZone(-28800000, "America/Los_Angeles", Calendar.AUGUST, 1,
                -Calendar.SUNDAY, 7200000, Calendar.DECEMBER, -1, Calendar.SUNDAY, 7200000, 3600000);

        // checking the initial value      
        System.out.println("Initial value : " + stobj);

        // setting end rule
        stobj.setEndRule(Calendar.MAY, 2, Calendar.TUESDAY, 3600000);

        // checking the new value      
        System.out.println("New value : " + stobj);
    }
}