belongs to collection: Java Most Popular & Searched Programs
Print Screen Resolution: This java program will print the screen resolution.
package com.includehelp; import java.awt.Dimension; import java.awt.Toolkit; /** * Program to print Screen Resolution * @author includehelp */ public class ScreenResolution { static String getResolution(){ Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); short width = (short)screenSize.getWidth(); short height = (short)screenSize.getHeight(); String resolution = width+" X "+height; return resolution; } public static void main(String[] args) { System.out.println("Screen Resolution : "+getResolution()); } }
Output
Screen Resolution : 1366 X 768
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Print Screen Resolution: This java program will print the screen resolution.
Output