Recently I stumble on one of the Java interview questions: “Implement List-Recently-Used (LRU) Cache using Java collection class?” If you have worked on similar problem before, then it is really easy for you. Otherwise you start thinking about the best collection class to implement LRU cache. Most of the people fail to recognize that LinkedHashMap […]

,

Note: This post is written by our guest author Boni Satani. Any piece of code or application running on a computer or cloud system is vulnerable to risks and can threaten privacy, security and integrity issues. This fact has gained importance and acceptance by developers round the world and organizations especially dealing with key customers’ […]

Developers often get into dilemma when they have to convert the object to string representation by choosing between valueOf() and toString() method. Because both the methods do the same thing but in a bit different ways. To give you more context, toString() method is present in Object class and generally overridden in the derived class […]

,

As we know regular expression is a very handy tool to processing the string. It really saves your coding and very nested if-else statements. But when you run your application on resource sensitive system then you may want to carefully choose the tools to use. ¬†Initially I thought regular expression would equal or less time […]

, ,

As I have mention in my previous post that hashCode() and eqauls() implementation are basic concepts of Java and any developer should know about these while using Collection classes. These are important concepts and even asked in technical interviews. When equals() method is implemented it is also necessary to implement hashCode() method. In this post, […]

, ,

There are two methods hashCode() and equals() present in Object class which are important and should be implemented in class. A Java developer should know the basic concept behind these methods. And sometimes even in technical interview questions are asked related to these. This get more important when object is used in hash based Collection […]

, , ,