// Create a new Properties object Properties props = new Properties(); // Add some properties props.setProperty("name", "John"); props.setProperty("age", "25"); // Clear all the properties props.clear();This method is useful when you need to reset the properties to an empty state. The Properties class is part of the java.util package in the Java library.