The Java SE 6 Platform Quiz

 
By Robert Eckstein, Dana Nourie, John O'Conner, and Robert E. Strout II, November 2006  
Duke The Java Platform, Standard Edition 6 (Java SE 6) has a number of improvements over the J2SE 5.0 release. This quiz tests your knowledge on just a few of these improvements. Download Java SE 6 and contribute to the JDK 6 Project.

Choose the best answer(s) for each question, then click Submit to see how you scored.

 

  1. What scripting language can you use in the Java SE 6 platform?
     A. Groovy
     B. JavaScript
     C. Ruby
     D. Python
     E. All of the above


  2. What is the normalization of Unicode text?
     A. The process of removing every third character from a String object
     B. Proper punctuation
     C. The process of converting Unicode text data to common, well-known formats for comparisons, searches, and other text processing
     D. Removal of offensive words
     E. All of the above


  3. How do you launch your host's default browser to view a specific URL?
     A. Display a dialog box that asks the user to start the browser.
     B. Use the new Desktop API to programmatically launch default desktop applications for certain file types.
     C. You cannot do this from Java technology-based applications.
     D. Double-click on your browser's desktop icon and cross your fingers.
     E. None of the above.


  4. How can I sort JTable content?
     A. Export your table content and use OpenOffice to sort your table as a spreadsheet.
     B. You must sort content before you put it into your TableModel.
     C. Use the sortItForMe() method of the JTable class.
     D. Use a TableRowSorter, which provides sorting and filtering of your existing TableModel.
     E. None of the above.


  5. What is the correct annotation to use to export a method as a web service operation using Java API for XML Web Services (JAX-WS), version 2.0?
     A. @WebService
     B. @WebMethod
     C. @WSMethod
     D. @WSService
     E. @SQL


  6. In JDK 6, the JMX Monitor API now uses a thread pool to increase performance. What is the purpose of the JMX Monitor API?
     A. It allows the creation of user-defined MXBeans.
     B. It supplies additional metadata about the MBean.
     C. It controls how the MBean is displayed on your monitor.
     D. It allows an application to sample MBean properties and send notification if necessary.
     E. All of the above.


  7. JDK 6 incorporates an advanced version of the SwingWorker class into core Java technology. What is the purpose of the SwingWorker class?
     A. It helps to move graphical user interface (GUI) event-processing functionality off the event-dispatching thread.
     B. It coordinates interthread communication between an executing thread and the worker thread.
     C. It aggregates several type parameters generated by the worker thread into a single, generic return object.
     D. All of the above.
     E. None of the above.


  8. What is the best Java platform to use with the upcoming release of the Microsoft Windows Vista operating system?
     A. Java SE 6
     B. J2SE 5.0
     C. J2SE 1.4
     D. J2SE 1.3
     E. J2SE 1.2


  9. In the Java SE 6 platform, what key tuning option(s) are needed to achieve high performance?
     A. -Xms -Xmx
     B. -server -XX:+UseParallelGC
     C. -XX:+AggressiveOpts
     D. None of the above
     E. All of the above


  10. The Java SE 6 platform delivers a technology that can greatly improve performance by reducing unnecessary synchronization overhead. It allows a thread to lock and unlock an object with minimal use of atomic operations. What is this technology called?
     A. Adaptive spinning
     B. Biased locking
     C. Parallel OLD GC
     D. Atomic fast path
     E. None of the above