Technical Interview Preparation

Get hired by top tech companies with our comprehensive interview preparation.

Get Started

Category: Java

Java

Triplet class in Java

This post will discuss how to implement a Triplet class in Java that can store three values of any type, using the Pair class provided by the Apache Commons Lang library.

Java

Clone a Set in Java

Write a Java program to construct a set containing all elements of the specified set and in the same order as the original set. In other words, clone a set in Java. Assume there are no mutable objects in the set, and a shallow copy can be performed.

Do NOT follow this link or you will be banned from the site!