Source Code:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package zexample;
/**
*
* @author bnson
*/
public class Java_System_Properties {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
System.out.print("This java application is executed at: ");
System.out.println(System.getProperty("os.name"));
}
}
Output:
run:
This java application is executed at: Linux
BUILD SUCCESSFUL (total time: 2 seconds)
No comments:
Post a Comment