i want to get the value for Accumulation but it returns no value. Any help with resolving it will be appreiated

    private double getAccumulation(){
       double Accumulation = 0;
       double Monthly_Depreciation;
       int Estimated_Useful_Life = 5;
       double Cost_Of_Acquisition = 2000;
       double Estimated_Residual_Value = 500;


       try{
            Monthly_Depreciation = (Cost_Of_Acquisition - Estimated_Residual_Value)/Estimated_Useful_Life;


            Accumulation += Monthly_Depreciation;
            Accumulation++;
            System.out.print(Accumulation);



       }catch(Exception e){
        JOptionPane.showMessageDialog(null, e);   
       }

       return Accumulation;
   }

did you call your method properly?

thanks i solved it

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.