Five-parameter method of class

Source: Internet
Author: User

Two main characteristics of an object:

Properties and Methods

1. Method:

The access modifier method returns a value type method name () {

The body of the method

}

1. No parameter method

There are return values such as:

Public String Play () {

Return value type is consistent with the returned value type of the method

return "hehe";

}

No return value for example: public void play () {

}

2. With the Parameter method

Allows mutual invocation between methods

2. member variables and local variables

A member variable refers to a variable in a class//can be used anywhere in a class! Java will give the member variable an initial value

Local variable refers to the method of the variable////can only be used inside the method, out of the way is not in! Java does not give initial values to local variables

Local variables have higher precedence in the same class when the member variable and local variable have the same name

3.JavaDoc

Five-parameter method of class

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.