The Java SE 6 Pleatform Quiz


 

1. What scripting language can you use in the Java SE 6 platform?
Blank X Answer (E): The Mozilla Rhino engine implements the JavaScript technology scripting language and is available in the core Java Runtime Environment (JRE). However, the scripting API allows you to use any scripting engine that conforms with JSR 223.
2. What is the normalization of Unicode text?
Blank X Answer (C): The Java SE 6 platform provides the public java.text.Normalizer class, which allows you to convert text data to common composed or decomposed forms, allowing for accurate comparisons and searches on text. Before the Java SE 6 platform release, the Normalizer class had been hidden in the Java platform. The class is now a public API.
3. How do you launch your host's default browser to view a specific URL?

 

Blank X Answer (B): The Desktop API allows your program to launch applications associated with certain file types on the host platform. The current implementation can launch a web browser, text editor, and email application.
4. How can I sort JTable content?
Blank X Answer (D): A javax.swing.table.TableRowSorter wraps your existing TableModel. You can configure it to filter or sort your JTable contents.
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?
Blank X Answer (B): The @WebMethod annotation is used to mark a method that is exposed as a web service operation. Note that the @WebService annotation is used to specify that the class is a web service or that the interface defines a web service. The programmer will likely use the @WebService annotation in conjunction with the @WebMethod annotation. See the article " Introducing JAX-WS 2.0 With the Java SE 6 Platform, Part 1" for more information.
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?
Blank X Answer (D): The JMX Monitor API allows an application to sample an attribute property of an MBean periodically and send a notification event if it passes a given threshold. It now uses a thread pool instead of creating a thread for each monitor. Another improvement is the ability to monitor a value within a complex type.
7. JDK 6 incorporates an advanced version of the SwingWorker class into core Java technology. What is the purpose of the SwingWorker class?
Blank X Answer (D): Since the 1998 publication of SwingWorker in the article " Threads and Swing," developers have continuously requested that it be moved into core. At the 2004 JavaOne conference, the Desktop team presented a new version of SwingWorker that included generification, use of the concurrency package, and PropertyChangeListener support. Much of this functionality assists with interthread communication. The Java SE 6 platform release incorporates a similar version of SwingWorker that greatly assists developers in processing GUI-driven functionality off the event-dispatching thread, indicating status and progress and aggregating the results.
8. What is the best Java platform to use with the upcoming release of the Microsoft Windows Vista operating system?
Blank X Answer (A): The Java SE 6 platform release works best with the latest user interface (UI) enhancements of Windows Vista. According to a recent blog entry by Chet Haase: "The primary delivery of Java for Vista is Java SE 6; that release has received most of our focus during the Vista beta release timeframe." Go to the JDK 6 Project site to download the most recent version. The release is pretty close to final, so it is working very well at this point. All of the serious Windows Vista problems have been fixed in this release for months, so it is a particularly good test vehicle for Java technology on Vista.
9. In the Java SE 6 platform, what key tuning option(s) are needed to achieve high performance?
Blank X Answer (D): See the blog entry " No Tuning Required: Java SE Out-of-Box Vs. Tuned Performance" for a comparison of out-of-box and hand-tuned performance.
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?

 

Blank X Answer (B): The technique called store-free biased locking eliminates all synchronization-related atomic operations on uncontended object monitors. The technique supports the bulk transfer of object ownership from one thread to another, and the selective disabling of the optimization where unprofitable, using epoch-based bulk rebiasing and revocation. It has been implemented in the production version of the Java HotSpot virtual machine (VM) and has yielded significant performance improvements on a range of benchmarks and applications.

You missed 10
Your score is 0 percent.