Detect the Email Addresses

  • + 1 comment

    class Calculate { Output output=new Output(); double volume=0.0d; public double main(int a) {

             volume=a*a*a;
            return volume;
        } 
     public  double main(int a,int b,int c)
        {
    
          volume=a*b*c;
            return volume;
        } 
     public  double main(double r)
        {
          volume=((double)2/3)*Math.PI*r*r*r;
            return volume;
        } 
    

    public double main(double r,double h) {

      volume=Math.PI*r*r*h;
        return volume;
    } 
    

    public static Calculate get_Vol() {
    Calculate cal=new Calculate();

       return cal;
    

    } public int getINTVal() throws NumberFormatException, IOException { BufferedReader br =new BufferedReader(new InputStreamReader(System.in)); int ch=Integer.parseInt(br.readLine().trim()); String s=new Integer(ch).toString(); if(s.startsWith("-")) throw new NumberFormatException("All the values must be positive"); return ch;

    }
    
    public double getDoubleVal() throws NumberFormatException, IOException
    {  BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
    double ch=Double.parseDouble(br.readLine().trim());
        String s=new Double(ch).toString();
        if(s.startsWith("-"))
            throw new NumberFormatException("All the values must be positive");
    return ch;
    

    }

    }

    class Output { public void display(double volume) { String s=new Double(volume).toString(); String str[]=s.split("\."); if(str[1].length()==1) { s=s+"00"; } else if(str[1].length()==2) s=s+"0"; else if(str[1].length()>3) { volume=Math.round(volume * 1000.0) / 1000.0;
    s=new Double(volume).toString(); } System.out.println(s); }
    }

    this is my code am getting output in my ide but not here please someone help