30.6. Spinner Models and Editors

 
[Page 890 ( continued )]

Review Questions

Sections 26.1 “26.2

26.1 How does Java support international characters in languages like Chinese and Arabic?
26.2 How do you construct a Locale object? How do you get all the available locales from a Calendar object?
26.3 How do you set a locale for the French-speaking region of Canada in a Swing JButton ? How do you set a locale for the Netherlands in a Swing JLabel ?

Section 26.3 Processing Date and Time

26.4 How do you set the time zone "PST" for a Calendar object?
26.5 How do you display current date and time in German?
26.6 How do you use the SimpleDateFormat class to display date and time using the pattern "yyyy.MM.dd hh:mm:ss"?
26.7 In line 73 of WorldClockControl.java, Arrays. sort (availableTimeZones) is used to sort the available time zones. What happens if you attempt to sort the available locales using Arrays.sort(availableLocales) ?

Section 26.4 Formatting Numbers

26.8 Write the code to format number 12345.678 in the United Kingdom locale. Keep two digits after the decimal point.

[Page 891]
26.9 Write the code to format number 12345.678 in U.S. currency.
26.10 Write the code to format number 0.345678 as a percentage with at least three digits after the decimal point.
26.11 Write the code to parse 3,456.78 into a number.
26.12 Write the code that uses the DecimalFormat class to format number 12345.678 using the pattern " 0.0000# ".

Section 26.5 Resource Bundles

26.13 How does the getBundle method locate a resource bundle?
26.14 How does the getObject method locate a resource?

Section 26.6 Text File Encoding

26.15 How do you specify an encoding scheme for a text file?
26.16 What would happen if you write a Unicode character to an ASCII text file?
26.17 How do you find the default encoding name on your system?
 


Introduction to Java Programming-Comprehensive Version
Introduction to Java Programming-Comprehensive Version (6th Edition)
ISBN: B000ONFLUM
EAN: N/A
Year: 2004
Pages: 503

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net