There parametric method Java class

Here Insert Picture Description
Method parameters are Java classes:
a general form with reference method definition:
<access modifier> Return Type <method name> (<parameter list>) {
body methods //
}
II concept parameter
parameter is call parameter in defining methods.
It is the actual value of the arguments passed to the method is a method call.
Third, the requirement to match the real parameter participating in the call with the reference method.
Fourth, the package:
Create a package using the keyword package.
Import packages using the keyword import.
1, classes allow smaller cell (similar to a folder), easy to find and use the appropriate file
2, to prevent naming conflicts
3, better protection classes, attributes and methods

Published 31 original articles · won praise 0 · Views 371

Guess you like

Origin blog.csdn.net/weixin_45864941/article/details/103604293