public class Box {
private static int length;
private static int width;
private static int height;
public static void set(int l, int w, int h){
Box.length = l;
Box.width = w;
Box.height = h;
}
public static void volume(){
System.out.println(Box.length*Box.width*Box.height);
}
public static void main(String[] args) {
set(1,2,3);
volume();
}
}
emmm
你这是一点不会呢