Java_object class ToString Method

Source: Internet
Author: User

File:///C:/Java/jdk-8u45-docs-all/docs/api/index.html

  • tostring
     public string tostring () 
    Returns A String representation of the Object. In general, the toString method returns a string, which "textually represents" this object. The result should be a concise but informative representation, that's easy for a person to read. It is recommended, all subclasses override the This method.

    The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the At-sign character ' @ ', and the unsigned hexadecimal representation of th E hash code of the object. In other words, this method returns a string equal to the value of:

     getclass (). GetName () + ' @ ' +
      Integer.tohexstring (Hashcode ()) 
    returns:
    a string representation of the object.

Java_object class ToString Method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.