Browsed by
Tag: interview-questions

How to find duplicate elements in a List

How to find duplicate elements in a List

Problem statement

Write a program to find duplicate elements in a List.

We suggest you think about a solution before reading further…

Solution

Loop through each element in the List and insert each element HashSet class. We will get false for every element which is duplicate while inserting into the HashSet class.

Read More Read More

Collection Framework Interview Questions – Set 1

Collection Framework Interview Questions – Set 1

Hello Folks, collection is the favorite and popular among interviewers. Here is the list of most frequently asked collection interview questions and their answers.

Click here if you want to learn more about collection framework and their praticle implementations.

1). What is a collection framework ?

A collection framework is a class library to handle group of objects. Collection framework is implemented in java.util.package which gives you lists, sets, maps and queue to satisfy most of your coding needs.

Read More Read More