Write a Java Program to Determine the name and version of the operating system

Java Program to Determine the name and version of the operating system

Welcome to the World of Online Learning:

Hello Friends “This blog helps you to learn Java programming concepts. You can learn Java  language at your own speed and time. One can learn concepts of Java language by practicing various programs given on various pages of this blog. Enjoy the power of Self-learning using the Internet.”

Java Program to Determine the name and version of the operating system
Java Program to Determine the name and version of the operating system

Write a Java Program to Determine the name and version of the operating system

PROGRAM: Java Program to Determine the name and version of the operating system

/*Java Program to Determine the name and version of the operating system*/

class Main {
public static void main(String[] args) {

// get the name of operating system
String operatingSystem = System.getProperty(“os.name”);
System.out.println(operatingSystem);

}
}

Leave a Reply

Your email address will not be published. Required fields are marked *