How to declare unique ArrayList ?

Answer Posted / kiran

you have SET INTERFACE in COLLECTION in java . where u can
store unique elements and if u try to add duplicate elements
it will raise an error

Is This Answer Correct ?    10 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is stringbuffer faster than string?

685


Why should I use abstract class?

768


Will minecraft java be discontinued?

907


How do you add an arraylist to an array in java?

716


Are arrays passed by reference in java?

683


Which one will take more memory: an int or integer?

964


Write a program based on Java script program.

841


how to run ecllipse with jettyserver for windows environment using batch file

1706


What is the purpose of using break in each case of switch statement?

768


Which is easier .net or java?

833


How do you sing an Applet ?

2240


What makes a function well defined?

755


What is a boolean in java?

755


I want to print “hello” even before main is executed. How will you acheive that?

890


What is literal example?

724