How to eliminate duplicates from an array?
Answer Posted / edward sudhaharchennai
Unlike other implementations of the collection interface,
implementation of the Set intrface do not allow duplicate
elements. This also means that a set can contain at most
one null value. The set interface does not define any new
methods, and its add() and addAll() methods will not store
duplicates. If an element is not currently in the set, two
consecutive calls to the add() method to insert the element
will first return true then false...........
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
Define class?
What is called module?
Why is a constant variable important?
What is difference between local variable and global variable?
Can we have multiple catch block for a try block?
What is a parameter in a function?
What is replaceall in java?
Does A Class Inherit The Constructors Of Its Superclass?
What is the difference between Grid and Gridbaglayout?
Explain different states of a thread in java?
What are the difference between string, string builder, and string buffer in java?
Write an algorithm program in java for the following question.. In a VLSI design techniques,they used rectangles to design circuits. EVery rectangle is to be placed according to x,y coordinates. Check whether or not two rectangles overlap each other. Here overlapping of rectangles is acceptable, if 1) one rectangle intersect with other. 2) one rectangle fully covers other. The time of algorithm should not exceed o(n logn).
How is a structure different from array ?
how can i use a nonsynchronized hashtable?
What java ide should I use?