Collections.emptyNavigableSet() in Java

Collections.emptyNavigableSet(): This method is available in java.util.Collections class of Java.

Syntax:

<Object> NavigableSet<Object> java.util.Collections.emptyNavigableSet()

This method returns an empty navigable set.

Note: This set is serializable.

Parameters: NA

Returns: the empty navigable set.

Exceptions: NA

Approach

Java

import java.util.Collections;

public class CollectionsemptyNavigableSet {
    public static void main(String[] args) {

        System.out.println(Collections.emptyNavigableSet());

    }
}

Output:

[]


No comments:

Post a Comment