Quite many times, in our applications, we need to make use of the current time in milliseconds. Most of us follow the easy way and rely on java's System.currentTimeMillis(). (more…)
The Builder is a design pattern which belongs to the family of creational design patterns. It comes very handy when an object is complicated to create (i.e has too many fields) or when the developer needs to control the initialization of an object. (more…)
Singleton, is probably, the most controversial object oriented design pattern. Many people even consider it an antipattern. It is used when one and only one instance of a class should exist per JVM (or classloader). (more…)
Quite a few times when writing a Java application, there is the need of passing command line arguments to the program itself. Usually, the application would have to validate those arguments. For example, making sure that the user passed in a numeric value, or a boolean one. Sometimes validate that…
I am a huge fan of IDEs. I truly believe that a powerful IDE can boost a programmer's productivity by orders of magnitude. Additionally, i also believe that each developer should treat his/her IDE as a tool in his/her toolbox and try to get the most out of it. Having…