in Technology by
What is the difference between Set and Map in JAVA?

1 Answer

0 votes
by
The differences between the Set and Map are given below. Set contains values only whereas Map contains key and values both. Set contains unique values whereas Map can contain unique Keys with duplicate values. Set holds a single number of null value whereas Map can include a single null key with n number of null values.

Related questions

0 votes
    What is the difference between List and Set in JAVA?...
asked May 26, 2021 in Technology by JackTerrance
0 votes
    What is the difference between heat map and treemap of Tableau?...
asked Oct 30, 2020 in Technology by JackTerrance
0 votes
    I would like to know the relation between the mapreduce.map.memory.mb and mapred.map.child.java.opts parameters. ... .child.java.opts? Select the correct answer from above options...
asked Jan 28, 2022 in Education by JackTerrance
0 votes
    How to synchronize List, Set and Map elements?...
asked May 27, 2021 in Technology by JackTerrance
0 votes
    Which of these methods can be used to obtain set of all keys in a map? (a) getAll() (b) getKeys( ... The Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these methods can be used to obtain set of all keys in a map? (a) getAll() (b) ... java programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    I have one column in my table which will store data in string format the sample data is {"pre- ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 27, 2022 in Education by JackTerrance
0 votes
    Is there a data structure that implements the Map interface and holds an array of elements with continuous ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 24, 2022 in Education by JackTerrance
0 votes
    What is the purpose of map method of stream in Java 8?...
asked Nov 8, 2020 in Education by Editorial Staff
0 votes
    What is the difference between the length of an Array and size of ArrayList in Java?...
asked May 27, 2021 in Technology by JackTerrance
0 votes
    What is the difference between Collection and Collections in JAVA?...
asked May 26, 2021 in Technology by JackTerrance
0 votes
    What is the difference between HashMap and Hashtable in JAVA?...
asked May 26, 2021 in Technology by JackTerrance
0 votes
    What is the difference between HashMap and TreeMap in JAVA?...
asked May 26, 2021 in Technology by JackTerrance
0 votes
    What is the difference between HashSet and HashMap in JAVA?...
asked May 26, 2021 in Technology by JackTerrance
0 votes
    What is the difference between HashSet and TreeSet in JAVA?...
asked May 26, 2021 in Technology by JackTerrance
...