How to declare unique ArrayList ?

Answer Posted / ballu

i think java does not this in built facility ... you would
need to make sure that objects inserted in array are unique
( by overriding equals() and hash() method of Object class

Is This Answer Correct ?    3 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does 0 mean in boolean?

544


What is a war file?

551


What is the difference between a method and a function in alice?

577


What is the console in java?

680


What is the replace tool?

551






Can list be null in java?

579


What things should be kept in mind while creating your own exceptions in java?

633


What is a locale?

697


Does java set allow duplicates?

529


What is a nested structure?

539


How is the marker interface used in Java?

612


How do you use compareto method?

534


How do you pass by reference?

539


Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).

1606


What is meant by vector class, dictionary class, hash table class, and property class?

685