Demo entry 6635742



Submitted by anonymous on Aug 19, 2017 at 12:38
Language: Java. Code size: 256 Bytes.

public static boolean isWindows() {
        String osName = new String();
        osName = System.getProperty("").toLowerCase();  //determines current       OS
        return osName.contains("windows");    //checks if osName is "windows"

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).