we need to return a value in the function when the return type is indicated in the method 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;
}