VOOZH about

URL: https://www.geeksforgeeks.org/java/java-lang-character-subset-class-java/

⇱ Java.lang.Character.Subset Class in Java - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Java.lang.Character.Subset Class in Java

Last Updated : 13 Sep, 2023
Character.Subset Class represents particular subsets of the Unicode(standards using hexadecimal values to express characters - 16bit) character set. The subset, it defines in Character set is UnicodeBlock. Declaration :
public static class Character.Subset
 extends Object
Constructors :
  • protected Character.Subset(String str) : Constructs new subset instance.
Methods:
  • equals() : java.lang.Character.Subset.equals() tells whether the two Subset Object are equal or not. Syntax :
    public final boolean equals(Object o)
    Parameters : 
    o : object to be compare with.
    Return :
    true : if o equals argumented object, else false.
    
  • hashCode() : java.lang.Character.Subset.hashCode() returns the hashCode value of the Subset.. Syntax :
    public final int hashCode()
    Parameters : 
    ---
    Return :
    hashCode of the argumented object.
    
  • toString(): java.lang.Character.Subset.toString() returns name of the Subset. Syntax :
    public final String toString()
    Parameters : 
    ---
    Return :
    string representation of the argumented object.
    
Output :
Is a equals a ? : true
Is b equals a ? : false

hashCode geeks : 366712642
hashCode for : 1829164700

a : geeks
b : for
Note : lang.Character.Subset Class inherits others methods from java.lang.Object class. For details about java.lang.Object, refer : Object class in Java.
Comment
Article Tags: