Java source code examples

Java source code samples. Java code examples.

Gets operating system name using java

* * * * * 1 votes

public class SystemExample {
	public static void main(String[] args) {
		String value = System.getProperty("os.name");

		System.out.println(value);
	}
}

Tags: java.lang

Discuss This Code