Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners why set doesn't allow duplicate value
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Ragini Shukla
why set doesn't allow duplicate value
1 Answer(s)      3 years and 4 months ago
Posted in : Java Beginners


HI Everyone

Any one can help me why set not allowed duplicate value in java.

Please post ur comment, its urgent.

Thanks in advance


Advertisement
View Answers

March 22, 2012 at 7:04 PM


1)Because set internally used Tree hierarchy that follows binary tree algorithm that's why it doesn't allow duplicate value. 2) It uses equals method for all object that we are storing in set.



Related Tutorials/Questions & Answers:
why set doesn't allow duplicate value
why set doesn't allow duplicate value  HI Everyone Any one can help me why set not allowed duplicate value in java. Please post ur comment, its urgent. Thanks in advance
Why doesn't Java allow overriding of static methods?
Why doesn't Java allow overriding of static methods?  Why doesn't Java allow overriding of static methods
Advertisements
javascript duplicate value
javascript duplicate value  In javascript how to find the duplicate or variable that contains same value for example ...two different variables contains the same URL Link.    //To loop through use this $("a:contains
Column count doesn't match value count at row 1
Column count doesn't match value count at row 1  Column count doesn't match value count at row 1 UPDATE user_profile SET id=[value-1],user_id=[value-2],full_name=[value-3],mobile_phone=[value-4],hide_email_id=[value-5],hide
how to set the value of textfield constant
how to set the value of textfield constant  how to set the value of textfield constant
what is set value or get value mathod?
what is set value or get value mathod?  i create a JTable in this table it containt 3 column or 10 rows. i want to get two value from access file db1 and i want to set third value in third column and set it in again db1? pls tell
Why string is storing null value - IoC
it is also storing null value in temp. WHY so...Why string is storing null value  I am reading lines from a file and then splitting it with " " as the criteria If line has first element null
how to set value of dropdown list
how to set value of dropdown list  Hello Sir, I'd solved the earlier problems somehow but now this time another problem arised when I want to pass the value from a link to a dropdown list. I want to set the dropdown list selected
how to set value of dropdown list
how to set value of dropdown list  Hello Sir, I'd solved the earlier problems somehow but now this time another problem arised when I want to pass the value from a link to a dropdown list. I want to set the dropdown list selected
how to allow table editing
how to allow table editing   1**. hi... l've tried the method isCellEditable(int rowIndex, int colIndex) { return true but it doesn't enabled the user the editing of any cell why????????????? regards
java.sql.SQLException: Column count doesn't match value count at row 1 - JSP-Servlet
java.sql.SQLException: Column count doesn't match value count at row 1  Hi I am trying to put my data into database. But I found the error of : java.sql.SQLException: Column count doesn't match value count at row 1 I
Set Date Parameter to get specific value
Set Date Parameter to get specific value  How to set the date parameter or fetch a specific data records based on date? For example fetching the two or three months old records
How to set a variable value using velocity
How to set a variable value using velocity       This Example shows you how to set variable value.... #set($list[Ajay, Bhanu, Komal, Shuki, Rakesh
why above code returning the value of squares is 82... even after returning an increnented value of squares... please help me...
why above code returning the value of squares is 82... even after returning an increnented value of squares... please help me...   public class d55 { int squares = 81; public static void main(String
Spring Null value, Set null value in Springs configuration file
Spring Null value, Set null value in Springs configuration file In this example you will see how to set null value in the Spring configuration file. NullBean.java package spring.nullvalue.example
duplicate values
duplicate values  My database having cursor that has duplicate values.i want to remove duplicate values through java application
Null value when i set interface object in form controller - Spring
Null value when i set interface object in form controller   Hi all, i am very new about spring and hibernate. i got null value when i set interface object in form Controller. public void setOHBillManager(OHBillManager
Set Interface
table and doesn't allow to store duplicate collections. This class permits the null.... It neither contains duplicate elements nor  maps a key value to an object... prints out the list of numbers in the set, note that the duplicate number
how to set a value of dynamic number of drop down lists on a jsp page and access it value on another jsp page
how to set a value of dynamic number of drop down lists on a jsp page and access it value on another jsp page  actually i have to create dynamic... ,rating2......number of buks in that category(and each drop down list has value
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jpa.sequence' doesn't exist
'jpa.sequence' doesn't exist Error Code: 1146 Call: UPDATE SEQUENCE SET SEQ...' doesn't exist  Hi, I am developing an application using JPA 2.1...] Query: DataModifyQuery(name="SEQUENCE" sql="UPDATE SEQUENCE SET SEQ_COUNT = SEQ
JTable duplicate values in row
JTable duplicate values in row  JTable duplicate values in row
Java duplicate elements
Java duplicate elements  Which class has no duplicate elements
profile doesn't match application identifier
profile doesn't match application identifier  profile doesn't match application identifier
Remove duplicate values
Remove duplicate values  i am trying to insert values into database...:publisher,dc:language in SQL database. in which dc:title will not allow null and dc:dcid is primary key. other attributes can allow null. am trying to insert values
why java is securable ?
why java is securable ?  why java is securable ?   Hi Friend, Java is secured because of following reasons: 1) It doesn't allow readability as it contains byte code understandable only to JVM. 2)The byte code
PHP duplicate file - PHP
PHP duplicate file   i wanted to duplicate a PHP file resides in different directory on submission
How to change the value of a variable which is set in jsp (by jstl method) by calling the function from js?
How to change the value of a variable which is set in jsp (by jstl method) by calling the function from js?  How to change the value of a variable... the value in jsp by using jstl method for eg:'<'c:set var="name1" value="Add User
PHP Remove Duplicate Values
. Return Value Another array without duplicate values  ...PHP Array Remove Duplicate Values In PHP if we need to remove duplicate values... an array and returns another array without duplicate values. General
JavaScript duplicate string
checked the condition that whether created duplicate copy of text field value... JavaScript duplicate string...; We can create a strings duplicate string with the use of JavaScript's
Mysql Find Duplicate Records
Mysql Find Duplicate Records       Mysql Find Duplicate Records is used to find the duplicate Records... 'Mysql Find Duplicate Records'. To grasp and understand example, the select
JavaScript duplicate method
JavaScript duplicate method       JavaScript's duplicate method creates a duplicate copy of the specified text range. In this example code we have called the duplicate
Advertisements
 

 

 

DMCA.com