HttpCookie HashCode() Example

Return hash code of this http cookie.


HttpCookieclass HashCode() method example. This example shows you how to use HashCode() method.This method Return hash code of this http cookie.

Here is the code:-
/* 
 * @Program that Return hash code of this http cookie.
 * HashCode.java 
 * Author:-RoseIndia Team
 * Date:-26-Jun-2008
 */

import java.net.*;

public class HashCode {
 public static void main(String[] argsthrows Exception {
        String name = "Roseindia";
        String value = "ABC";
        HttpCookie hc = new HttpCookie(name, value);
        //Return hash code of this http cookie.
        System.out.println("Hash code of this http cookie is: "+hc.hashCode());
    }
}

Output of the program:-
 Hash code of this http cookie is: -2032328376

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US