import java.util.*;
import java.lang.*;
import java.io.*;

// The main method must be in a class named "Main".


    class Cylinder{
        int radius,height,width;

        public  Cylinder(int r , int h){
               radius=r;
                  height=h;

        }
        // overload a constructor
        public Cylinder(int r,int h , int j){
                           radius=r;
                  height=h;
                  width=j;
        }
        // void Setradius (int a){
        //     radius=a;
        // }
        // void Setheight (int h){
        //      height=h;
        // }

        
        // int  Getradius2(){
        //     return radius;
        // }
        // int Getheight2(){
        //     return height;
        // }
        // float Getvolume(){
        //     float volume = 3.14f*(radius*radius)*height;
        //     return volume;
      // }
    }
  class Main {  
      
    
    public static void main(String[] args) 
    {
        Cylinder c1 = new Cylinder(12,13);
        // overload a constructor 
        Cylinder c2 = new Cylinder(12,13,14);
        System.out.println("chapter 9 practise set");
        System.out.println("we are back");
    
        
        // c1.Setradius(25);
        // c1.Setheight(10);
        // System.out.println(c1.Getheight2());
        // System.out.println(c1.Getvolume());
    }
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: