Java Vector equals() Method24 Mar 2025 | 1 min read The equals() method of Java Vector class used to compare the specified object with this Vector for equality. It returns true if and only if the specified object is also a list, both lists have the same size and all corresponding pairs of elements in the two lists are equal. Syntax:Following is the declaration of equals() method: Parameter:
Returns:The equals() method returns true if the specified object is equal to this Vector, otherwise returns false. Exceptions:NA Compatibility Version:Java 1.2 and above Example 1:Output: Is vector1 equals vector2 ? false Example 2:Output: Is vector1 equals vector2 ? true Vector list: [1, 2, 3, 1, 2, 3] Next TopicJava Vector |
We request you to subscribe our newsletter for upcoming updates.

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