Here is a sample to get and display the current version of your computer operating system using Java. The code is very easy to learn and understand. Thank you.
My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
Sample Program Output
Program Listing
/* Written By: Jake R. Pomperada, MAED-IT */
/* Language : Java */
/* Date : May 6, 2017 */
package demo;
public class os {
public static void main(String[] args) {
String name = "os.name";
String version = "os.version";
String architecture = "os.arch";
System.out.print("\n\n");
System.out.print("\t Getting Operating System Information in Java ");
System.out.print("\n\n");
System.out.println("Name: " + System.getProperty(name));
System.out.println("Version: " + System.getProperty(version));
System.out.println("Arch: " + System.getProperty(architecture));
}
}
No comments:
Post a Comment