VOOZH about

URL: https://www.geeksforgeeks.org/java/properties-isempty-method-in-java-with-examples/

⇱ Properties isEmpty() method in Java with Examples - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Properties isEmpty() method in Java with Examples

Last Updated : 11 Jul, 2025
The isEmpty() method of Properties class is used to check if this Properties object is empty or not. Syntax:
public boolean isEmpty()
Parameters: This method accepts no parameters Returns: This method returns a boolean value stating if this Properties object is empty or not. Below programs show the implementation of int isEmpty() method. Program 1:
Output:
Properties: {Book=500, Mobile=5000, Pen=10, Clothes=400}
Is Properties empty: false
Program 2:
Output:
Current Properties: {}
Is Properties empty: true
References: https://docs.oracle.com/javase/9/docs/api/java/util/Properties.html#isEmpty--
Comment