GregorianCalendar.BC has the following syntax.
public static final int BC
In the following code shows how to use GregorianCalendar.BC field.
import java.util.Calendar; import java.util.GregorianCalendar; /*from w ww. j av a2 s . c om*/ public class Main { public static void main(String[] args) { GregorianCalendar cal = new GregorianCalendar(); cal.set(Calendar.ERA, GregorianCalendar.BC); System.out.println(cal.getTime()); } }
The code above generates the following result.