Java Collections synchronizedSortedSet() MethodThe synchronizedSortedSet() method of Java Collections class is used to get a synchronized (thread-safe) sorted set backed by the specified sorted set. SyntaxFollowing is the declaration of synchronizedSortedSet() method: Parameter
ReturnsThe synchronizedSortedSet() method returns a synchronized view of the specified Sorted Set. ExceptionsNA Example 1Test it NowOutput: Synchronized Sorted set is :[Facebook, Instagram, Twitter, Whatsapp] Example 2Test it NowOutput: Set after Synchronized sorted set- 101 102 103 104 105 Example 3Test it NowOutput: 1000 Next TopicJava Collections Class |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India