Method parameter Default Value

Source: Internet
Author: User

Sometimes we can use the default value of the method to make it easier to use. It is also a small trick. You can understand this usage. 650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/205K13W8-0.jpg "title =" Capture. JPG "/>

Then, when we call

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/205K12Y1-1.jpg "title =" Capture. JPG "/>

That is, we do not need to enter this bool value. The default value is false. This true value is passed in only when this method parameter is required to be true. I just briefly demonstrated this default value, so you can understand it.

This article from the "life pursuit" blog, please be sure to keep this source http://hacjj.blog.51cto.com/3843027/1242934

Related Article

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.