Class Definition Java Tutorial

In Java 5 you can import static fields using the import static keywords.
Before Java 5, to use a static final field in the Calendar class, you must first import the Calendar class.

import java.util.Calendar;
Then, you can use it by using the notation className.staticField.

if (today == Calendar.SATURDAY)
In Java 5, you can do

import static java.util.Calendar.SATURDAY;
if (today == SATURDAY)