The role of Java string.valueof ()

Source: Internet
Author: User

A cast of data is required to read the data, and a string.valueof (a) can be used to cast a to a string type

Sometimes a is already a string type, but for the rigor of the code, will also add string.valueof (a), then string.valueof (a) omitted will not be wrong.

But sometimes it involves a server problem, so it's better to join String.valueof (a).

Using string.valueof () for data conversion, this method returns a "null" string if the converted data is null

String) method, if the converted data is NULL, a null object is returned instead of a "null" string.

The role of Java string.valueof ()

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.