Java Collections synchronizedNavigableSet() Method with Examples Last Updated : 03 Jan, 2022 Comments Improve Suggest changes Like Article Like Report The synchronizedNavigableSet() method in Java collections is used to get the thread-safe navigable set with the given navigable set. Syntax: public static <T> NavigableSet<T> synchronizedNavigableSet(NavigableSet<T> set) Parameters: set is the input navigable set. Return: It will return the synchronized navigable set from the given input (navigable set). Exception: It will not raise any exception. Example: Java // Java program to add elements // to the Navigable set and convert // them into the synchronized // navigable set with string data import java.util.*; public class GFG { // main method public static void main(String[] args) { // create an navigable tree set NavigableSet<String> data = new TreeSet<>(); // add elements into the set data.add("sravan-it"); data.add("manoj-cse"); data.add("sai-cse"); data.add("vignesh-it"); // get the synchronized navigable // set from the above set Set<String> final1 = Collections.synchronizedNavigableSet(data); // display System.out.println(final1); } } Output[manoj-cse, sai-cse, sravan-it, vignesh-it] Example 2: Java // Java program to add elements to the Navigable // set and convert into the synchronized // navigable set with integer data import java.util.*; public class GFG { // main method public static void main(String[] args) { // create an navigable tree set NavigableSet<Integer> data = new TreeSet<>(); // add elements into the set data.add(7058); data.add(4511); data.add(7859); data.add(4532); // get the synchronized navigable // set from the above set Set<Integer> final1 = Collections.synchronizedNavigableSet(data); // display System.out.println(final1); } } Output[4511, 4532, 7058, 7859] Example 3: Java // Java program to remove an item // from the synchronized navigable // set import java.util.*; public class GFG { // main method public static void main(String[] args) { // create an navigable tree set NavigableSet<Integer> data = new TreeSet<>(); // add elements into the set data.add(7058); data.add(4511); data.add(7859); data.add(4532); // get the synchronized navigable // set from the above set Set<Integer> final1 = Collections.synchronizedNavigableSet(data); // remove 4511 element final1.remove(4511); // display System.out.println(final1); } } Output[4532, 7058, 7859] Comment More infoAdvertise with us Next Article Java Collections synchronizedNavigableSet() Method with Examples M manojkumarreddymallidi Follow Improve Article Tags : Java Java-Functions Java-Collections-Class Practice Tags : Java Similar Reads Java Collections synchronizedNavigableMapâ() Method with Examples NavigableMap is used for convenient navigation methods like lowerKey, floorKey, ceilingKey, and higherKey, along with this popular navigation method. It will take key-value pair as input We can create a navigable map by using the following syntax: NavigableMap<key_datatype, value_datatype> dat 2 min read Collections synchronizedSet() method in Java with Examples The synchronizedSet() method of java.util.Collections class is used to return a synchronized (thread-safe) set backed by the specified set. In order to guarantee serial access, it is critical that all access to the backing set is accomplished through the returned set. Syntax: public static <T> 2 min read Collections synchronizedList() method in Java with Examples The synchronizedList() method of java.util.Collections class is used to return a synchronized (thread-safe) list backed by the specified list. In order to guarantee serial access, it is critical that all access to the backing list is accomplished through the returned list. Syntax: public static < 2 min read Collections synchronizedSortedSet() method in Java with Examples The synchronizedSortedSet() method of java.util.Collections class is used to return a synchronized (thread-safe) sorted set backed by the specified sorted set. In order to guarantee serial access, it is critical that all access to the backing sorted set is accomplished through the returned sorted se 2 min read Java Collections unmodifiableNavigableSetâ() Method with Examples In this article we will discuss about unmodifiableNavigableSet() method. Introduction This method is available in NavigableSet. It is an data structure that can store elements in an order. For this we have to use tree set. we can create a treeset by using the following syntax: NavigableSet<dataty 2 min read Like