Latest Tutorials| Questions and Answers|Ask Questions?|Site Map

Home Answers Viewqa Java-Beginners Java code for set...!!!

View Questions and Answers by Category


Have Programming Question? Ask it here!

Pankaj Jain
Java code for set...!!!
0 Answer(s)      2 years and 6 months ago
Posted in : Java Beginners

Create 2 classes in same package

productId, name, price

create a set in this and try to add objects of product. You should write this exercise such that it should not allow the duplicate products to be added into the set(equal productId).

Hint: override equals & hashcode method

View Answers

Related Tutorials/Questions & Answers: