Question: 7. The Points: 6 owing programs contain errors. Find the errors, correct it, and write output (You are not allowed to add any new codes)
7. The Points: 6 owing programs contain errors. Find the errors, correct it, and write output (You are not allowed to add any new codes) package javaapplication54; public class VBox t ot allowed to change data type of Access modifiers private int width private int length; private int height; publie int VBox(int width, int length, int height) width- width; length -length; height height; publie statie int getVolumeo int vol-length width height; return vol; package javaapplication54; public elass JavaApplication54 public static void main(Stringll args) int width-12,length 10,height 8 VBox boxl -new VBox(width, length, height); show Data(boxl); /inot allowed to change public void show Data( int b) System.out.println("'Inin Your Figure volume is:"+b.getVolume0)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
