Sunday, 16 August 2015

java calculate percentage from decimal values

public String getAgegt150Per() {
BigDecimal bd3 = agegt150.divide(this.totalPayment,
RoundingMode.HALF_UP);
Integer val = bd3.multiply(new BigDecimal(100)).intValue();
if (val.intValue() == 0)
return "";
else
return val.toString() + "%";
}

7 comments:

  1. This code is really nice and it's working. Tahnks for sharing this all the information.

    Render Cleaning Company
    K-Rend Services

    ReplyDelete
  2. Microsoft office has a different version, and the entire version has the different setup file. Some of the version is Office 2013, Office 2016 and Office 365 etc. Go to www.office.com/setup and redeem your key. Office Com Setup is one of the most popular productivity programs around. If you have your product key handy, you don't even need a disc to start installing Office just visit office setup help. Norton is one of the most reliable antivirus providers in the market to download visit www.norton.com/setup . There are multiple manufacturers making printers for home and office use with varied range as printer series per the need and affordability of different customers. Printer Tech Support. It has become one of the most useful computer hardware devices that allow people to convert computer generated typescript into a physical printed document.

    ReplyDelete

  3. Thank you sharing the excellent post about JAVA programming. you helped me to gain

    more information on the JAVA language.


    Java Training Institutes in Chennai |
    Java Course in Chennai

    ReplyDelete
  4. Microsoft office has a different version, and the entire version has the different setup file office.com/ set up . Some of the version is Office 2013, Office 2016 and Office 365 etc. Go to www.office.com/setup . Norton is one of the most reliable antivirus providers in the market. Norton is delivering top rated protection from mobile devices and computers. Norton has 3 antivirus packages norton com setup .mcafee.com/activate McAfee have the complete set of features which can protect your digital online and offline life of the computing devices, and it not only help you to protect it install mcafee.If your PC is having a slow performance and you are facing problems due to this, then we can provide a solution to that. avira tech support . Our Avira Customer Support is open to those who have issues relating to downloading, updating or upgrading Avira Antivirus software avira antivirus phone number .We can also assist you to confirm your product if you are not sure about its validity. avira refund .

    ReplyDelete