Java tutorial
import java.awt.Toolkit; public class Main { public static void main(String[] args) { Toolkit tk = Toolkit.getDefaultToolkit(); System.out.println("Screen resolution = " + tk.getScreenResolution()); } }