Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Quizzes

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
Print Button
 

JavaTM Platform Performance: Strategies and Tactics

by Steve Wilson

Duke How much do you know about program performance pitfalls and code optimization techniques? Chapters from The JavaTM 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. JiniTM technology
     B. JavaSpacesTM 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 JavaTM 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 J2SETM 1.3 do?
     A. Tells HotSpotTM 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.


Print Button
[ This page was updated: 21-Sep-2000 ]
Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary | Feedback | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-2000 Sun Microsystems, Inc.
All Rights Reserved. Terms of Use. Privacy Policy.