In a box

Report a typo

You are given a class named Box that has three double fields.

Create an instance method to calculate the volume of the box. The method must be named getVolume. It should take no arguments and return a double result.

Do not make the fields and method private!

Write a program in Java 17
class Box {

double height;
double width;
double length;

// write a method here
}
___

Create a free account to access the full topic