This post is another addition in best practices series available in this blog. In this post, I am covering some well-known and some little known practices which you must consider while handling exceptions in your next java programming assignment. Follow this link to read more about exception handling in java. Table of Contents Type of […]
An enum type, also called enumeration type, is a type whose fields consist of a fixed set of constants. The very basic purpose of enums is to enforce compile time type safety. In this post, I will list down all necessary features of enums you should know. Sections in this post: What is enum in […]
We all know what Serializable interface guarantees i.e. ability to serialize the classes. This interface recommends you to use serialVersioUID also. Now, even if you use both in your classes, do know what can break your design even now?? Lets identify the future changes in your class which will be compatible and others which will […]
XPath is a syntax used to describe parts of an XML document. In this tutorial, we will see some useful ways to apply xpath to extract information from an XML file.
Before writing this post, I am assuming that you know the basics of junit. If you do not have the basic knowledge, first read this link. Further, in this post, I will write the best practices you must consider before writing your test cases. Table of Contents: Unit testing is not about finding bugs Tips […]
Friends, we have been using exception handling in our code for almost every industry standard application. Usual approach is to create some custom Exception classes extending the base Exception class. In this post, I will suggest another approach which might make you more sense. This post is part of series related to best practices and […]
Have you ever tried to reason, why main method in java is public, static and void? I tried to find out and after some analysis, below are my findings. Please feel free to add if i am missing anything, I will update this post. Sections in this post: Why public? Why static? Why void? Why […]