Core Section Index
A clear policy on how to code Java exceptions will save you time diagnosing, reproducing, and correcting issues. Here are several tips to improve your exception handling.
If you were wondering how to dynamically load a class based on some configuration or settings file, then you might be able to solve your problem using Java Reflection and Properties.
An evolution of the builder design pattern.
Sometimes understanding the best practices for OOP requires looking at some of the worst practices you can do...
A number of questions are asked in interviews. Here is a resource of a list of questions you might be asked.
Developers have many Java collection classes available, but are they using the right collection to best suit their needs?
Every application fails once in while. Even the ones built with Java, using design patterns, best practices, and a lot of good intentions. So we better prepare our applications for these situations...more
Java contains a lot of useful utility packages. One is java.util with its lists, maps, and calendar stuff--a lot to look into and use in your applications. Another package, java.io, contains what y...more
For testing our programs we need a simple directory structure, with a few files and a few directories. Something along the lines of this:
Outputting results to System.out is not actually cutting edge technology, so let's consider showing the directory structure in some other formats. In the first one we'll present the output as an HT...more
The class for the directory is also rather simple, but this class also has to keep track of the files and directories it contains. Let's use two Vectors for this purpose. Since the code is so simpl...more
If you show this jsp-file in an XML-aware browser like Microsoft Internet Explorer 5.5 you'll get this picture:
One of the advantages of using your own exception class is that you can format the data and the trace back like you want it.
One of the things which are saved in our exception class is the exception it has just caught. By doing this we'll get a linked list of exception classes, that can document the calling sequence "top...more