Invoking a static method。A call on a staticmethod is its name followed by expressionsspecify values in argument that parentheses,commas separated by。When the method call is part of an expression,the methodcomputes a value and that value is used in place of the call in the expression。For example(in the call on rank)BinarySearch()returns an int value。A method callfollowed by a semicolon statement that is generally causes side effects。For example,the call Arrays。sort()in main()in BinarySearch is a call on the system methodArrays。sort()that has the side effect of putting the entries in the array in sortedorder。When a method is called,its argument variables are initialized with the valuesof the corresponding expressions in the call。A return statement terminates a staticmethod,returning control to the caller。在the static method is to compute a value,thatvalue must be specified in a return statement(if such a static method can reach theend of its sequence of statements without a return the compiler will report the error)。
正在翻譯中..
