Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

object class of java

// Default behavior of toString() is to print class name, then
// @, then unsigned hexadecimal representation of the hash code
// of the object

public String toString()
{
    return getClass().getName() + "@" + Integer.toHexString(hashCode());
}
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #object #class #java
ADD COMMENT
Topic
Name
7+5 =