Tag Archives: Java – util package

Java.util.Locale Class in Java | Set 2

Java.util.Locale Class in Java | Set 1 More methods: getDisplayVariant() : java.util.Locale.getDisplayVariant() displays variant of the Locale Syntax : public final String getDisplayVariant() Parameters : —- Return : ———– getDisplayVariant(Locale in) : java.util.Locale.Locale in(Locale in) returns the variant of “in” locale. Syntax : public final String getDisplayVariant(Locale in) Parameters : in : the instance local… Read More »

Java.util.Locale Class in Java | Set 1

As the name suggests util.Locale Class is used to perform locale task and provides locale information for the user. Declaration : public final class Locale extends Object implements Cloneable, Serializable Constructors : Locale(String L) : Creates Locale form the given language code. Locale(String L, String C) : Creates Locale form the given language, country code.… Read More »

Java.util.PriorityQueue class in Java

It is a priority queue based on priority heap. Elements in this class are in natural order or depends on the Constructor we used at this the time of construction. It doesn’t permit null pointers. It doesn’t allow inserting a non-comparable object, if it relies on natural ordering. Constructors: PriorityQueue(): Creates a PriorityQueue with the… Read More »