Tip Bank

DevX - Software Development Resource

Package Protected Constructor

Question: I need to extend class A which resides in a different package, butclass A has only one constructor which is package protected. I get a compile error in class

DevX - Software Development Resource

Vectors vs. Hashtables

Question: Is there a significant speed advantage to using Hashtables over Vectors? Answer: The answer depends on how you are using those containers classes. Ifyou are only using them for

DevX - Software Development Resource

A HashMap of HashMaps

Question: I have been looking everywhere for information on HashMaps,particularly how to put one hash map into another HashMap. Answer: This is where the expression RTFM (Read That Fine Manual)

DevX - Software Development Resource

Stopping Threads

Question: How do you stop a Thread without using the stop() method? Answer: The recommended method for stopping threads in Java is for each thread topoll a boolean value or

DevX - Software Development Resource

Multiple Drawing Threads

Question: I have written an applet which uses a Graphics object to draw movingcircles. However, when multiple threads accesses the same Graphics object,the circles disappear after being on screen for

DevX - Software Development Resource

Altering the Substitution Character in SQL*Plus

When you are inserting data into Oracle tables in SQL*Plus using hard-coded string, some of the character fields may contain the ampersand character (&). The following is an example: insert

DevX - Software Development Resource

Indexing Foreign Key Columns in Child Tables

Although an index is not mandatory on your foreign keys, if they are not indexed you will cause additional locking when certain Data Manipulation Language statements are executed against the

DevX - Software Development Resource

Pre-Compiled Database Triggers

Many programmers create stored procedures out of large bodies of database trigger codes. This has primarily been because while stored procedures are stored in compiled form, database triggers are compiled