Embed presentation
Downloaded 10 times





![Method declaration
public static void main (String[ ] args){
System.out.println(“This is method body”);
}
ParameterModifier Modifier ReturnType Nameof Method
Methodbody](https://image.slidesharecdn.com/methodinjava-180317080426/85/Method-of-java-6-320.jpg)



The document discusses methods in Java. It defines a method as taking input, performing actions, and producing output. It notes that methods are defined within classes and have a general form of return type name(parameter list){method body}. The document provides an example of a main method with no parameters and an example of a class with a volume method that calculates and returns the volume of a box based on width, height, and depth fields.





![Method declaration
public static void main (String[ ] args){
System.out.println(“This is method body”);
}
ParameterModifier Modifier ReturnType Nameof Method
Methodbody](https://image.slidesharecdn.com/methodinjava-180317080426/85/Method-of-java-6-320.jpg)

