Taming Tiger: Formatted output - 2004-05-03
Tiger brings printf-style formatted output to the world of Java programming; and this month, columnist John Zukowski discusses all facets of the C-inspired support for printf and format strings.
Read Tutorial View Tutorial Discussion
Taming Tiger: Loading Properties from XML - 2004-04-26
The Properties class is an old favorite, around since the beginning of Java programming time with very few changes. The Tiger release of J2SE enhances this class, which allows you not only to use it to specify key-value pairs on a single line separated by an equal sign, but also to use XML files to load and save those key-value pairs. In this installment of "Taming Tiger", John Zukowski demonstrates how to use this updated work horse.
Read Tutorial View Tutorial Discussion
Taming Tiger: Prerelease of Tiger - 2004-04-19
Sun has quietly released an alpha version of J2SE 1.5, also known as "Tiger," and developer John Zukowski is in the big top ready to start his Tiger-taming act. This new column details the changes to the platform and provides examples for quick reference. In this first article, John shows you where to get the pre-release software and how to install it.
Read Tutorial View Tutorial Discussion
The past two installments of Java theory and practice have discussed various techniques for garbage collection and the basics of the JDK 1.4.1 garbage collectors. This month, columnist Brian Goetz looks at the performance impact of the choice of collector, how various coding idioms interact with the garbage collector, and how allocation and other related costs have changed in Java virtual machines over the past several years.
Read Tutorial View Tutorial Discussion
Unit testing with mock objects - 2004-02-18
Mock objects are a useful way to write unit tests for objects that act as mediators. Instead of calling the real domain objects, the tested object calls a mock domain object that merely asserts that the correct methods were called, with the expected parameters, in the correct order. However, when the tested object must create the domain object, we are faced with a problem. How does the tested object know to create a mock domain object instead of the true domain object? In this article, software consultants Alexander Day Chaffee and William Pietri present a refactoring technique to create mock objects based on the factory method design pattern.
Read Tutorial View Tutorial Discussion
Writing Multithreaded Java Applications - 2003-12-19
The Java Thread API allows programmers to write applications that can take advantage of multiple processors and perform background tasks while still retaining the interactive feel that users require. Alex Roetter introduces the Java Thread API, outlines issues involved in multithreading, and offers solutions to common problems.
Read Tutorial View Tutorial Discussion
Optimize your Java applications performance - 2003-12-15
Many useful techniques exist for optimizing a Java program. Instead of focusing on one particular technique, this article considers the optimization process as a whole. Authors Erwin Vervaet and Maarten De Cock walk readers through the performance tuning of a puzzle-solving program, applying an assortment of techniques ranging from simple technical tips to more advanced algorithm optimizations. The end result is a spectacular performance increase (more than a million fold) between the first working implementation and the fully optimized solution.
Read Tutorial View Tutorial Discussion