CompositeName isEmpty() method in Java with Examples
The isEmpty() method of a javax.naming.CompositeName class is used to check this composite name object is empty or not. A composite name is said to be empty if it has zero components.
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.
public boolean isEmpty()
Parameters: This method accepts nothing.
Return value: This method returns true if this composite name is empty, false otherwise.
Below programs illustrate the CompositeName.isEmpty() method:
This composite object is empty: false
This composite object is empty: true