Toolkit: getScreenResolution()
/* * Output: Screen resolution = 96 */ import java.awt.Toolkit; public class MainClass { public static void main(String[] args) { Toolkit tk = Toolkit.getDefaultToolkit(); System.out.println("Screen resolution = " + tk.getScreenResolution()); } }