Java Blog

 
 
 
 public class JAVA_064
 {
    public static void main(String[] args)
    {
       Sphere obj=new Sphere( ); // file containing this class is included in zip file

       double radius=5;

       obj.radius(radius);

       System.out.println(\"The radius of sphere object is : \" + radius);
       System.out.println(\"The volume of sphere object is : \" + obj.volume( ));
    }
 }

 
 
Didn't find what you were looking for? Find more on Program to show an example of creating a class and using its object