usis a variable of type (class)NumberFormat.getCurrencyInstance()is a static method (a method of the class, not of an object). So this method is not related to a object. But this method generates an object of classNumberFormat(a kind of factory), that is stored in the variableus.- now that you have a
NumberFormatobject, you can use it to format thepaymentas a string (following certain rules defined in yourusobject)
solved Explanation for syntax