Questions tagged as 'hashset'

2
answers

Create list without duplicate values

I have a list of int and I want to save more numbers in it, but numbers that do not repeat themselves. How do I find if it already has a certain value in this list?     
asked by 16.08.2014 / 02:59
3
answers

In what order is a Set stored? Random?

When I store something inside a Set , the order in which it stores is random? And how could I sort a Set ?     
asked by 12.11.2014 / 15:59
1
answer

Error calling add on a HashSet

Whenever I try to create a objeto.add(); and put the attribute on it, it still gives me an error. See my code: public class Agencia { private String nome; private String endr; Set<Conta> listaContas = new HashSet<Co...
asked by 08.11.2018 / 14:30
1
answer

How to use LinkedHashSet to implement this IHashSet interface?

How to use LinkedHashSet implementing the interface IHashSet using thread to resolve conflicts and with load factor 0.75? //Usando essa interface public interface IHashSet{ public void put(Object data); public boolean contains(...
asked by 19.07.2018 / 20:49