Today, I have come across one situation where money(currency) field has to be validated. According to Indian currency, we will consider 2 digits after period(.)
When I want to validate the particular field, I have tried with substring() and indexOf() methods. But I am not getting the expected result. I want to have the output ending with .##, So, I have come to know about NumberFormat class from java.text package.
Here goes sample code with output:
Input: 234 / 234.232 / 234.3
Output: 234.0 / 234.23 / 234.3
NumberFormat nf = new DecimalFormat(".##");
System.out.println("Input: "+234+"Output: "+nf.format(234));
Please send your feedback and queries to email@example.com
Please send your review and feedback to firstname.lastname@example.org
Hi friends, I have updated my Aadhaar details from Aadhaar update center. It is mentioned that within 72 hours, my details will be update...
Hi everyone, I booked my train ticket even it is in WaitingList. Because, I guessed that, It will get confirmed when chart prepares. Aft...
For the academic purpose i had written a small program in Matlab. I have tried encoding and decoding the image by using Huffman coding. ...