
Assume that the double variable number holds the value 459.6329. What format pattern would you use to display the number as 00459.633?
Thank you.

Hi Friend,
You can use the following code:
import java.text.*;
public class DecimalFormatExample{
public static void main(String args[]){
double amount = 459.6329;
DecimalFormat formatter = new DecimalFormat("00000.000");
System.out.println("The Decimal Value is:"+formatter.format(amount));
}
}
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.