Java SimpleTimeZone .setStartYear (int year)
Syntax
SimpleTimeZone.setStartYear(int year) has the following syntax.
public void setStartYear(int year)
Example
In the following code shows how to use SimpleTimeZone.setStartYear(int year) method.
// w ww .ja v a2 s .co m
import java.util.SimpleTimeZone;
public class Main {
public static void main( String args[] ){
SimpleTimeZone stobj = new SimpleTimeZone(820,"US");
// checking initial value
System.out.println("Initial value: " + stobj);
// setting start year
stobj.setStartYear(2008);
// checking the new value
System.out.println("Final value : " + stobj);
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.util »
Java Tutorial »
java.util »