The clear() method of java.util.Locale.Builder class in Java is used to reset this Locale.Builder. It means that this method will create another instance of Locale.Builder with all the properties reset to their initial state and return it.
public Locale.Builder clear()
Parameter: This method do not accept any parameter.
Return Value: This method returns an Locale.Builder instance which is the reset state of this Locale.Builder set to its initial state.
Exception: This method do not throw any Exception.
LocaleBuilder: java.util.Locale$Builder@232204a1 Clearing the LocaleBuilder Cleared LocaleBuilder: java.util.Locale$Builder@232204a1
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.