detail in this section the modifiers part includes the same kinds of scope modifiers that can be used for variablessuch as publicprotectedand staticwith similar meanings the type part of the declaration defines the return type of the method the name is the name of the methodwhich can be any valid java identifier the list of parameters and their types declares the local variables that correspond to the values that are to be passed as arguments to this method each type declaration type can be any java type name and each parameter can be any java identifier this list of parameters and their types can be emptywhich signifies that there are no values to be passed to this method when it is invoked these parameter variablesas well as the instance variables of the classcan be used inside the body of the method likewiseother methods of this class can be called from inside the body of method when method of class is calledit is invoked on specific instance of that class and can change the state of that object (except for static methodwhich is associated with the class itselffor exampleinvoking the following method on particular gnome changes its name public void renamegnome (string sname /reassign the name instance variable of this gnome method modifiers as with instance variablesmethod modifiers can restrict the scope of methodpublicanyone can call public methods protectedonly methods of the same package or of subclasses can call protected method privateonly methods of the same class (not methods of subclasscan call private method if none of the modifiers above are usedthen the method is friendly friendly methods can only be called by objects of classes in the same package the above modifiers may be preceded by additional modifiersabstracta method declared as abstract has no code the signature of such method is followed by semicolon with no method body for examplepublic abstract void setheight (double newheight)