The java.net.SocketPermisson class represents whether you have permission to access a network via sockets. A SocketPermission consists of a host and a set of actions.
public final class SocketPermission extends Permission implements Serializable
Constructor Description ManagementPermission(String name) This constructs a ManagementPermission with the specified name. ManagementPermission(String name, String actions) This constructs a new ManagementPermission object.
public SocketPermission(String host, String action):
Used for creating a new object of SocketPermission class with specified actions.
Method Description equals(object obj) It checks whether the two SocketPermission objects are equal or not. getActions() It returns the actions of this SocketPermission object in String format hashcode() It returns the hash code value for this object. implies(Permission p) It checks whether this SocketPermssion object implies this permission or not. newPermissonCollection() It returns a new PermissionCollection object.
connect,resolve -1204607085 java.net.SocketPermissionCollection@30dae81 ( )
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.