
write a complete java application to prompt the user for the radius of a sphere,and call method sphereVolume to calculate and display the volume of the sphere.use the Math.pow(radius)method and Math.PI constant of Math class.

import java.util.*;
class VolumeOfSphere {
public double sphereVolume(double r)
{
double sph=4/3;
double volumeOfSphere = sph * Math.PI * Math.pow(r,3);
return volumeOfSphere;
}
public static void main (String[] args)
{
VolumeOfSphere sphere = new VolumeOfSphere ();
Scanner input=new Scanner(System.in);
System.out.print("Enter radius: ");
double r=input.nextDouble();
double volume=sphere.sphereVolume(r);
System.out.println("Volume of Sphere: "+volume);
}
}