Sun Java Solaris Communities My SDN Account Join SDN
 
Quizzes

Java Platform Performance: Strategies and Tactics

 

Quizzes Index

Platform Performance: Strategies and Tactics


September 2000

Duke How much do you know about program performance pitfalls and code optimization techniques? Chapters from The Java Platform Performance: Strategies and Tactics explain how to improve raw I/O throughput and how to get better performance out of Project Swing's JTable component. Test your knowledge with this interactive quiz on revving application performance.
  1. At what stage of the software development process should you worry about performance?
     A. Analysis
     B. Design
     C. Coding
     D. Testing
     E. All of the above


  2. Which tool is most useful for optimizing the speed of your code?
     A. Source-level debugger
     B. Profiler
     C. Disassembler
     D. Optimizing source code to bytecode compiler


  3. Which of the following technologies depend on the "Serialization" mechanism?
     A. Jini technology
     B. JavaSpaces technology
     C. RMI
     D. All of the above
     E. None of the above


  4. Which Java language keyword is most important for tuning serialization performance?
     A. final
     B. private
     C. transient
     D. synchronized


  5. What is the key difference between the java.util.Vector and java.util.ArrayList classes?
     A. Vector requires less memory.
     B. ArrayList implements the Collection interface.
     C. Vector is heavily synchronized, while ArrayList is not.
     D. All of the above.


  6. What guarantees does the Java Virtual Machine1 Specification make regarding objects that provide a finalize method?
     A. These objects are given priority during garbage collection.
     B. The finalize method is called before the object is collected.
     C. The finalize method is called after the object is collected
     D. The object is collected directly after the finalize method is called.


  7. In Project Swing you can create your own Renderer objects. These can be used to enhance display, as well as improve performance. When creating a custom TableCellRenderer, what must you be sure to do?
     A. Always return a new Component from the getTableCellRendererComponent method.
     B. Always return a Component that is an instance of JComponent.
     C. Recycle objects returned from the getTableCellRendererComponent method.
     D. None of the above.


  8. Swing programs should be single threaded.
     A. True
     B. False


  9. Java archives (aka JAR files) can be used to improve the download speed of your applets. What types of files can be stored in JAR archives?
     A. XML files
     B. Graphics files
     C. Class files
     D. B and C
     E. All of the above


  10. What does the -server flag in J2SE 1.3 do?
     A. Tells HotSpot to create small thread stacks to allow for higher numbers of threads.
     B. Tells HotSpot to use its most advanced code generation techniques to achieve maximum performance.
     C. Tells the java.net. package to use asynchronous socket connections.
     D. All of the above.
     E. None of the above.

_______
1 As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.