import java.util.Properties; public class SystemPropertiesExample { public static void main(String[] args) { Properties properties = System.getProperties(); System.out.println(properties.getProperty("os.name")); System.out.println(properties.getProperty("os.version")); System.out.println(properties.getProperty("os.arch")); } }This example retrieves the operating system name, version, and architecture from the system properties and prints them to the console. The System class is part of the java.lang package, which is automatically imported into all Java programs. The java.util package is also used in this example to import the Properties class.