Actually, what can you get from
public static final NumberFormat getInstance()
is ALSO a NumberFormat , but it is a specific instance of a subclass.
You cannot create an instance of an abstract class in any way so that the method cannot return a simple NumberFormat, but something that is at least equal to NumberFormat . In this case, the method is used to get the standard formatting for your locale, which will probably be DecimalFormat or some of its variants
The DecimalFormat documentation says:
To get the NumberFormat for a specific language, including locales, call one of NumberFormat's factory, such as Unix (). In general, do not call DecimalFormat constructors directly, as NumberFormat factory methods can return subclasses other than DecimalFormat.
To conclude: you can be sure that if it is abstract, then you cannot create it, nor can Java itself .. since some parts are missing in the declaration, therefore it is incomplete.
source share