Question: ( 1 0 points; 2 points each ) One of the most important innovations in Java was internationalization. Before Java, all programming languages were US
points; points each One of the most important innovations in Java was internationalization. Before Java, all programming languages were US centric most remain Englishcentric When Java was designed it was clear that this wasn't going to suffice. So Java integrated classes in the API that generalize attributes of things like dates, currency, and time.
Use the methods in the Currency class in the API to write a code fragment that performs each of the following actions.
a Write the import statement that will allow you to use the Currency class.
b Declare and construct a Currency object with reference US dollars using the static getInstance method in the Currency class. The String that represents US dollars is "USD". Static methods that return a reference to a newly constructed object are called factory mothnds This is a verv common trick to conceal constructors.
c Print out the number of fractional digits that are used in US dollars using the object from b
d Print out the numeric code that is used to represent US dollars using the object from b
e Print out the symbol that is used to represent US dollars using the object from b
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
