Today, I was browsing for something on internet and found this link. This was enough interesting for me to share with you guys. Lets browse this link and share your thoughts. I will be also trying my hands on this language very soon. A demo video on their site: [vimeo http://www.vimeo.com/31248257 w=400&h=300] Happy Learning !!
This is very common interview question where you have to find duplicate words in a string or some text. This can be solved using some overly-complex algorithms also, but in this post, I will propose rather an easy way using java collections. Lets say we have an String/ text like below: “a r b k […]
A clone is an exact copy of the original. In java, it essentially means the ability to create an object with similar state as the original object. The clone() method provides this functionality. In this post, we will explore most of the important aspects of java cloning. This post is part of mini guides posted […]
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 […]
We all know the basic statement that finalize() method is called by garbage collector thread before reclaiming the memory allocated to the object. In this post, we will drill down more deeply into this method. Sections in this post: finalize() execution is not guaranteed at all (with example) Other reasons for not using it finalize() […]
Abstract factory pattern is yet another creational design pattern and is considered as another layer of abstraction over factory pattern. In this post, i will expand the problem statement discussed in previous post and will see, how abstract factory pattern solve the problem. In my previous post, “Implementing factory design pattern in java“, we discussed […]
An immutable class is one whose state can not be changed once created. There are certain guidelines to create an class immutable. In this post, we will revisit these guidelines. Sections: Benefits of making a class immutable Guidelines to make a class immutable Benefits of making a class immutable Lets first identify benefits of making […]