How to Remove Duplicates from ArrayList in Java

ArrayList is the most popular implementation of List interface from Java's Collection framework, but it allows duplicates. Though there is another collection called Set which is primarily designed to store unique elements, there are situations when you receive a List e.g. ArrayList in your code and you need to ensure that it doesn't contain any duplicate before processing. Since with ArrayList you cannot guarantee uniqueness, there is no other choice but to remove repeated elements from ArrayList. There are multiple ways to do this, you can follow the approach we used for removing duplicates from array in Java, where we loop through array and inserting each element in a Set, which ensures that we discard duplicate because Set doesn't allow them to insert, or you can also use remove method of ArrayList to get rid of them, once you found that those are duplicates.

10 Books Every Programmer Should Read

There is saying that if you learn from your mistakes, you will only going to learn few things, but if you learn from other's mistake, you can learn a lot of things in short time, and what could be a better way to learn from someone's experience then reading books. Programming as a career is about constant learning and updating yourself, but unfortunately, there is no right way to begin. School and Colleges are far behind when it comes to real world programming, and every computer science graduate is not lucky to work in a company which is great in training. Only viable option is to read the book and follow advice from the great programmer and authors who are gone to that path. I still regret that why I didn't come to know about Clean Code when I started programming. These are the books which can change your career, can make you a better programmer. These books are more about a way of thinking, organizing, and becoming better at the craft of software engineering. They won't make you better at any particular programming language e..g Java but they will help you to become a better Programmer.

Top 40 Core Java Interview Questions Answers from Telephonic Round

Here is my another post about preparing for Java Interviews, this time we will take a look at 40 core Java questions from telephonic round of Java Programming interviews. Phone interviews are usually the first step to screen candidate after selecting his resume. Since its easy to call a candidate then to schedule a face-to-face interview, book rooms and arrange for meeting, telephonic round of interviews are quite popular now days. There were days only one telephonic round of interview was enough but now days, its almost two and three round of phone interview with different team members. Key to success in telephonic interview is to the point and concise answer. Since Interviewer wants to cover lot of things on telephonic round, they appreciate to the point answer instead of blah blah and dragging answer for sake of time. Always remember, its your time to make impression also so make sure you have good phone, fully charged and use voice modulation technique to be as clear as possible. Even if you don't know the answer, think a loud, interviewer appreciate ability to think and some time that proves to be decisive as well.