A method with a return type of void may still have a return statement in it's code. code example
Example: how to create a function that returns in java
// a method for computing the area of the rectangle
public int getArea() {
return width * height;
}