Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.








Question: Given a reference to an object B that is a subclass of A and overrides method foo(), is there any way I can invoke the base implementation of foo()
Question: I’m doing a select statement within a stored procedure, which returns several columns. I would like to assign a random number to each column, but when I use the
With embedded combinations of loops, conditions, and try / catch statements, it can be difficult to keep track of where each section ends when quickly scanning your Java code, even
When writing javadoc-style comments, use HTML tags to improve the readability of the generated documented. For example: /** * This is the first paragraph. * This is the second paragraph.
If you have two or more classes that need to share some constant value(s), but you want the classes to be independent of each other, define the constant values in
Good design goes hand in hand with the nomenclature it uses for exchanging that design between developers. A key feature to writing good code consists of good naming conventions and
It is an error to call the member function pop() on an empty stack. If you are not sure whether a stack contains any elements, you can use the member
An uninitialized pointer has an indeterminate value. It’s almost impossible to test subsequently whether such a pointer is valid, especially if it is passed as an argument to a function,
When creating menu items and adding them to a menu, you can shorten your code by combining two steps into one. Instead of creating the menu item and adding it
C and C++ make a clear-cut distinction between two types of pointers: data pointers and function pointers. A function pointer embodies several constituents such as the list of arguments, a
A pure virtual function is merely an interface and can be thought of as a way to enforce policy. A pure virtual function should be used when subclasses implement the
You can use affixes to help the compiler figure out the correct type of a hard coded integer. The letter L affixed to a number indicates a long integer and
An elaborated type specifier is a type name preceded by one of the keywords: enum, struct, union, and class. You can use an elaborated type specifier to instantiate an object
Standard C defines the function bsearch, which performs a binary search on an array of elements. The function bsearch is very efficient, but it works only on sorted arrays. You
It is illegal to assign the address of a static class member to a pointer to member. However, you can take the address of a static member function of a
When a container reallocates its elements, their addresses change correspondingly. Consequently, the values of existing iterators are invalidated: #include #include using namespace std;void main() { list payroll; payroll.push_back(5000.00); list::iterator p
You can define a pointer to a class template member. For example, you can use the specialization vector: typedef void (vector< int >::*v_vi_szt) (size_t); // v_vi_szt is used to hide
All STL (Standard Template Library) containers provide the begin()/end() pair of member functions. The member function begin() returns an iterator that points to the first element of the container: vector
Java’s reflection API allows the instantiation of an object using only its String description. A Java application can determine the class of an object from the associated string and then
In Java, the keyword final qualifies a construct (class, variable, or method) that may not be changed or overridden. Qualifying a variable as final ensures that the variable may not
The gc() call on the Java Virtual Machine’s garbage collector is often misunderstood. One of the reasons Java is such an easy language to program in is that it takes
The Vector class in java.util is one of the most frequently used classes in Java development. It almost makes the problem of memory management non-existent, unlike a fixed-size array. However,
A thrown exception is guaranteed to be caught
It’s easy to change the background color of your page, but if you don’t also define the foreground color and link colors, it’s likely that some users will not be
When you want to serve up a new type of file that Microsoft’s Internet Information Server (IIS) does not recognize, you need to add a MIME type. With older versions
Many times a form that works perfectly well on a table-less Web page stops working when inserted into a table cell. To make the form work again, move the and
When using ASP to create browser cookies, by default the cookie is alive only as long as the browser is running. You can make cookies last longer by defining an
Using a file named ROBOTS.TXT in your root directory allows you to control the indexing behavior of most Web crawlers with respect to your site (search engines like AltaVista use
At times you might want to know how much screen real estate a user has before opening several new browser windows. You also might want to find out if they
You can think of an iterator as a pointer to elements of a container. All STL (Standard Template Library) containers provide the basic iterator type along with its const counterpart.









