Tip Bank

DevX - Software Development Resource

Vector vs. Array–the Best of Both Worlds

It’s often pointed out that the Vector class is expensive to use because all of the methods are synchronized. Java 2 has the LinkedList class, which can serve the same

DevX - Software Development Resource

Modifying Layout on Multiple Platforms

You can use the Toolkit’s getScreenSize().width to recompute the size of a component at run time. For example, if you have a Frame that is supposed to have the screen’s

DevX - Software Development Resource

Using NULL in a Query’s Where Clause

While comparing a field to NULL, a SQL query should use the IS operator in place of the “=” operator. The reason is that if the ANSI_NULLS option is On

DevX - Software Development Resource

The Order of Destructors’ Call

An object’s destructor invokes the destructors of its direct base classes and member objects. The invocation occurs in the reverse order of the construction of the subobjects. Note, however, that

DevX - Software Development Resource

Be Careful With Initializers in Constructors

You should use caution when automatically initializing class variables. In this example, C1 calls setVal() in its constructor, and C2, a subclass of C1, overrides the method to set a

DevX - Software Development Resource

Working With Collections

When working with collections, use an error handler to easily determine if a given key exists in the collection. If you try to access an item from a collection where

DevX - Software Development Resource

NT Scheduling

Question: How do I schedule to run my Exe automatically?When I schedule it, the exe does not run. Answer: First, for Command Scheduler to work consistently, the Schedule service must