SocketPermission HashCode() Example

Returns the hash code value for this object.


SocketPermissionclass HashCode() method example. This example shows you how to use HashCode() method.This method Returns the hash code value for this object.

Here is the code:-

/**
 * @Program that Returns the hash code value for this object.
 * HashCode.java 
 * Author:-RoseIndia Team
 * Date:-27-jun-2008
 */
import java.net.*;
import java.io.*;
import java.util.*;

public class HashCode {

    public static void main(String[] args) {
        String host = "www.catalog.com";
        String action = "connect";
        SocketPermission permission = new SocketPermission(host, action);
        System.out.println("Hash code value for this object is: "
                +permission.hashCode());
    }
}

Output of the program:-
 Hash code value for this object is: -942608299

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

HOME | COPYRIGHT | CONTACT US