8:07 am - Sunday August 20, 2017

Retrieve a HashCode of a Vector int hashCode( )

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044

BACK

                                    The hashCode() method is used to return the hash code value for this Vector.

Example program

import java.util.Vector;

public class VectorHashCode 
{

	public static void main(String[] args)

	{

		Vector h = new Vector();

		h.add(1);

		h.add(2);

		h.add(3);

		System.out.println("the hashCode: " + h.hashCode());

	}
}

Output

the hashCode: 30817

BACK

Filed in: Java Examples

Comments are closed.