Google News
logo
Java Collections - Interview Questions
What is the difference between Set and Map?
* 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.
Advertisement