Java Data Type Tutorial - Java System.getProperties()








Syntax

System.getProperties() has the following syntax.

public static Properties getProperties()

Example

In the following code shows how to use System.getProperties() method.

//  w  w w .  j av  a 2s .  c o m

import java.util.Properties;

public class Main {

   public static void main(String[] args) {

      Properties p = System.getProperties();
      p.list(System.out);
  }
}

The code above generates the following result.