The following code is written the exact same way as in a Java book I am reading
package main;
import java.awt.Color;
import java.awt.DisplayMode;
import java
DisplayMode has to do with Java "Full Screen Exclusive Mode" functions, which are documented here:
http://docs.oracle.com/javase/tutorial/extra/fullscreen/displaymode.html
http://docs.oracle.com/javase/7/docs/api/java/awt/DisplayMode.html
I would encourage you to try some of the sample programs here:
The bottom line is:
1) not all OS's or display devices are necessarily supported by this API
2) All combinations of arbitrary DisplayMode settings aren't necessarily supported if the device itself doesn't support them