Core Section Index
6 Tips to Improve Java Exception Handling
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.
Dynamic Loading Using Java Reflection and Properties.
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.
The Step Builder Pattern
An evolution of the builder design pattern.
Best Practices in OOP
Sometimes understanding the best practices for OOP requires looking at some of the worst practices you can do...
Best Java interview questions
A number of questions are asked in interviews. Here is a resource of a list of questions you might be asked.
Which Java Collection Should I Use?
Developers have many Java collection classes available, but are they using the right collection to best suit their needs?
Using your own exception classes in Java
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
Files and Directories in Java
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
Files and Directories in Java | Directory Structure
For testing our programs we need a simple directory structure, with a few files and a few directories. Something along the lines of this:
Files and Directories in Java | HTML Output
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
Files and Directories in Java | The MyDir Class
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
Files and Directories in Java | XML Output
If you show this jsp-file in an XML-aware browser like Microsoft Internet Explorer 5.5 you'll get this picture:
Java Exception Classes | Formatting Routines
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.
Java Exception Classes | Linking the Classes
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