353,431 views
36 votes
36 votes
] Write a Java program to build an integer HashSet from scratch without using any built-in hash libraries. Your program should include these functions: a. insert (value): Insert any integer of your choice into the HashSet. b. contains(value) : Check the HashSet for the "value". Return "True" if the particular integer exists in the HashSet else return "Hey Nothing there".

User Ldez
by
2.8k points

1 Answer

22 votes
22 votes

Answer:

Step-by-step explanation:

The program was written in Java, it created the HashSet and the two seperate functions. Each of the functions uses the created HashSet and input values from the user to perform the appropriate actions on the HashSet. While also returning or printing the values if needed. The program has been tested and can be seen in the attached image below. Due to technical difficulties I have added the code as a txt file below as well.

] Write a Java program to build an integer HashSet from scratch without using any-example-1
User Cammy
by
2.8k points