The applyLocalizedPattern() Method of DecimalFormat class in Java is used to apply a localized string pattern to this Decimal format. This pattern can be set by the user.
public void applyLocalizedPattern(String pattern)
Parameters: The method takes one parameter pattern of String type and refers to the pattern which will be used to format the DecimalPattern.
Return Value: The method returns void type.
Below programs illustrate the working of applyLocalizedPattern() Method:
-1, 23, 45, 67, 90
-123, 456, 789.54
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.