Methods must be defined directly within a class definition; Java does not permit nesting one method definition within another method's definition. The order in which methods are listed within the class is not important. Actually, we have been writing a method in each of our programs all along, using the following: