
Develop the program calculateCylinderVolume., which accepts radius of a cylinder's base disk and its height and computes the volume of the cylinder

Hello arvind
Add the below code before main method :
public static double cylinderV(double r,double l){
double volume;
velocity=3.14*(r*r)*l;
return volume;
}
Hope this will solve Your problem.

Hi Friend,
Try the following code:
import java.util.*;
import java.text.*;
class CalculateCyliderVolume
{
public static void main(String[] args)
{
DecimalFormat df = new DecimalFormat("##.00");
double PI=3.14;
Scanner input=new Scanner(System.in);
System.out.print("Enter Radius: ");
double r=input.nextDouble();
System.out.print("Enter Height: ");
double h=input.nextDouble();
double volume=PI*r*r*h;
System.out.println("Volume of Cylinder: "+df.format(volume));
}
}
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.