For beginners, it is familiar to these often appearing names, but they are not fully understood.
Here are one by one explanations:
Public with the Private (these two are for the permission range)
Public XXX () {} is a public method that can be called by any one of the classes.
Private XXX () {} is a private method that can only be called in this class and cannot be called by any other class.
Span style= "Font-family:helvetica, ' Sans-serif '; color: #5D5D5D;" >void int Span style= "font-family: ' The song body '; color: #5D5D5D;" >, string , float etc)
like publicvoid xxx () {} what value will not be returned when this function is completed.
but this function can be called by any other class, because the Public .
Note: If a function does not return a value, it is not used when you name it void , Eclipse An error is automatically prompted.
Static
Static is a static function that uses the Static This means that the function belongs to the class and no more objects need to be created at the time of invocation.
such as: publicstatic void Test () {}
in the Main method is not used when calling New to create an object reference, enter directly Test () refer to this function.
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/9C/4E/wKioL1lu1qzRnEsfAACegg5WZkI550.png-wh_500x0-wm_ 3-wmp_4-s_2304220552.png "title=" create object. png "alt=" wkiol1lu1qzrnesfaacegg5wzki550.png-wh_50 "/>
There are problems can add group QQ Group:610845268
This article is from the "It Bug" blog, so be sure to keep this source http://laomomo.blog.51cto.com/6595318/1948870
Java--public_private_void_static Functional Effect