Java Vector contains() MethodThe contains() method of Java Vector class is used to check the vector which is in use contains the specified element or not. It returns true if this vector contains the specified element, otherwise returns false. Syntax:Following is the declaration of contains() method: Parameter:
Returns:The contains() method returns true if this vector contains the specified element, otherwise returns false. Exceptions:NA Compatibility Version:Java 1.2 and above Example 1:Test it NowOutput: Java is present at the index 1 Example 2:Test it NowOutput: Existence: true Next TopicJava Vector |
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