VOOZH about

URL: https://www.geeksforgeeks.org/java/concurrentskiplistset-contains-method-in-java/

⇱ ConcurrentSkipListSet contains() method in Java - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

ConcurrentSkipListSet contains() method in Java

Last Updated : 17 Sep, 2018
The contains() method of java.util.concurrent.ConcurrentSkipListSet is an in-built function in Java which returns a true boolean value if the specified element is present in this set otherwise it returns false. Syntax:
ConcurrentSkipListSet.contains(Object o)
Parameters: The function accepts a single parameter o i.e. to be checked for the presence in this set. Return Value: The function returns a Boolean value. It returns True if the specified element is present in this set else it returns False. Below programs illustrate the ConcurrentSkipListSet.contains() method: Program 1:
Output:
9 is not present in the set.
Program 2:
Comment