This topic has been a popular interview question for a long time. With the JDK 1.5 release, ExecutorService and BlockingQueue brought another way of doing it more effectively, but this approach is also worth knowing and might be useful in certain scenarios. Sections in this post: What are piped streams PipedReader and PipedWriter Running example […]
Have you ever faced problem of access denied or any login related issues after re-installing MySQL server. I faced this issue and when i googled it, I saw many others are also suffering from this problem frequently. In this post, I will suggest you a good try which will solve this problem in 95% of […]
If you are working on any hibernate project or you are planning to work on any in future, then you can easily understand the one-to-one relationships between several entities in your application. In this post, i will discuss variations of one-to-one mappings supported in hibernate. Download source code Sections in this post: Various supported techniques […]
Hibernate was started in 2001 by Gavin King as an alternative to using EJB2-style entity beans. Its mission back then was to simply offer better persistence capabilities than offered by EJB2 by simplifying the complexities and allowing for missing features. Hibernate used its mapping files and configuration files to achieve its objectives. With the introduction […]
We all are aware of the functional responsibilities of garbage collector [GC] in java. But, only few try to go real deep on how actually it works. You are not one of them and that’s why you are here. In this post, we will try to understand the current mechanism of GC and will understand […]
In a java application, even if your class implements Cloneable interface, you can not make a clone this class. This itself says a lot about broken behavior of cloning in java. In this post, I will explore other reasons for saying so. In my previous post about cloning in java, we discussed the various ways […]
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.