{"id":22551,"date":"2026-01-20T12:37:01","date_gmt":"2026-01-20T12:37:01","guid":{"rendered":"https:\/\/www.kaashivinfotech.com\/blog\/?p=22551"},"modified":"2026-01-20T12:37:01","modified_gmt":"2026-01-20T12:37:01","slug":"java-collection-framework-interview-questions","status":"publish","type":"post","link":"https:\/\/www.kaashivinfotech.com\/blog\/java-collection-framework-interview-questions\/","title":{"rendered":"Java Collection Framework Interview Questions: Master These 30 Critical Questions to Crush Your Coding Interview in 2026"},"content":{"rendered":"<p><strong>Java Collection Framework interview questions<\/strong> have become a decisive filter in modern Java interviews \u2014 especially for backend, full-stack, and enterprise roles. Today, companies don\u2019t just test whether you can write Java code; they evaluate how efficiently you <strong>manage data, choose the right data structure, and design performance-aware solutions<\/strong>.<\/p>\n<p>Many candidates fail Java interviews not because they don\u2019t know Java syntax, but because they misuse collections \u2014 choosing <code class=\"\" data-line=\"\">ArrayList<\/code> where <code class=\"\" data-line=\"\">LinkedList<\/code> fits better, ignoring thread safety, or failing to explain time complexity trade-offs. To interviewers, this signals weak real-world experience.<\/p>\n<p>Strong command over the <strong>Java Collection Framework<\/strong> shows that a candidate understands scalability, memory usage, concurrency, and clean architecture. That\u2019s why these questions are heavily used to differentiate average developers from production-ready engineers.<\/p>\n<p>What makes Java Collections even more critical is their presence everywhere \u2014 REST APIs, microservices, caching layers, databases, messaging systems, and system design rounds. And unlike AI-generated code, <strong>choosing the right collection requires reasoning, not automation<\/strong>.<\/p>\n<p>This guide focuses on the <strong>Top 30 Java Collection Framework interview questions<\/strong> that are most frequently asked \u2014 the exact questions interviewers rely on to test depth, not memorization.<\/p>\n<hr \/>\n<h2>Top 30 Java Collection Framework Interview Questions<\/h2>\n<h3>1. What is the Java Collection Framework?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nThe Java Collection Framework (JCF) is a unified architecture in Java that provides a set of <strong>interfaces, classes, and algorithms<\/strong> to store, manipulate, and retrieve groups of objects efficiently.<\/p>\n<p>It standardizes how collections like lists, sets, queues, and maps work, so developers don\u2019t need to reinvent data structures.<\/p>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo check whether you understand <strong>why collections exist<\/strong>, not just their names.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cJava Collection Framework improves code reusability, reduces development effort, and provides optimized data structures for different use cases.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nSaying \u201cCollections are used to store data\u201d without mentioning <strong>framework, interfaces, or standardization<\/strong>.<\/p>\n<figure id=\"attachment_22559\" aria-describedby=\"caption-attachment-22559\" style=\"width: 1536px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"size-full wp-image-22559\" src=\"https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/Java-Collection-Framework-Hierarchy-Diagram.webp\" alt=\"Java Collection Framework Hierarchy Diagram\" width=\"1536\" height=\"1024\" srcset=\"https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/Java-Collection-Framework-Hierarchy-Diagram.webp 1536w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/Java-Collection-Framework-Hierarchy-Diagram-300x200.webp 300w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/Java-Collection-Framework-Hierarchy-Diagram-1024x683.webp 1024w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/Java-Collection-Framework-Hierarchy-Diagram-768x512.webp 768w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/Java-Collection-Framework-Hierarchy-Diagram-440x293.webp 440w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/Java-Collection-Framework-Hierarchy-Diagram-680x453.webp 680w\" sizes=\"(max-width: 1536px) 100vw, 1536px\" \/><figcaption id=\"caption-attachment-22559\" class=\"wp-caption-text\">Java Collection Framework Hierarchy Diagram<\/figcaption><\/figure>\n<hr \/>\n<h3>2. What are the main interfaces in the Java Collection Framework?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nThe main interfaces in the Java Collection Framework are:<\/p>\n<ul>\n<li><strong>Collection<\/strong> \u2013 root interface for List, Set, and Queue<\/li>\n<li><strong>List<\/strong> \u2013 ordered collection, allows duplicates<\/li>\n<li><strong>Set<\/strong> \u2013 unique elements only<\/li>\n<li><strong>Queue \/ Deque<\/strong> \u2013 FIFO or double-ended operations<\/li>\n<li><strong>Map<\/strong> \u2013 key-value pairs (not part of Collection interface)<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test whether you understand the <strong>hierarchy<\/strong>, not just individual classes.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cMap is part of the Collection Framework but does not extend the Collection interface.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nSaying Map extends Collection \u2014 it does not.<\/p>\n<hr \/>\n<h3>3. What is the difference between Collection and Collections?<\/h3>\n<p><strong>Answer:<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th>Collection<\/th>\n<th>Collections<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Interface<\/td>\n<td>Utility class<\/td>\n<\/tr>\n<tr>\n<td>Represents a group of objects<\/td>\n<td>Provides static helper methods<\/td>\n<\/tr>\n<tr>\n<td>Base for List, Set, Queue<\/td>\n<td>Used for sorting, searching, synchronizing<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nBecause many candidates confuse these two \u2014 it\u2019s a classic trap question.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cCollections class contains only static methods like sort(), reverse(), and synchronizedList().\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nCalling Collections an interface \u2014 it\u2019s a class.<\/p>\n<hr \/>\n<h3>4. What is the difference between List, Set, and Map?<\/h3>\n<p><strong>Answer:<\/strong><\/p>\n<ul>\n<li><strong>List<\/strong>\n<ul>\n<li>Maintains insertion order<\/li>\n<li>Allows duplicate elements<\/li>\n<li>Example: ArrayList<\/li>\n<\/ul>\n<\/li>\n<li><strong>Set<\/strong>\n<ul>\n<li>Does not allow duplicates<\/li>\n<li>Order depends on implementation<\/li>\n<li>Example: HashSet, TreeSet<\/li>\n<\/ul>\n<\/li>\n<li><strong>Map<\/strong>\n<ul>\n<li>Stores data as key-value pairs<\/li>\n<li>Keys must be unique<\/li>\n<li>Example: HashMap<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo evaluate your <strong>data-structure selection skills<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cUse List when order matters, Set when uniqueness matters, and Map when fast lookup is required.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nSaying Set always maintains order \u2014 HashSet does not.<\/p>\n<figure id=\"attachment_22560\" aria-describedby=\"caption-attachment-22560\" style=\"width: 1536px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"size-full wp-image-22560\" src=\"https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/List-vs-Set-vs-Map.webp\" alt=\"List vs Set vs Map\" width=\"1536\" height=\"1024\" srcset=\"https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/List-vs-Set-vs-Map.webp 1536w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/List-vs-Set-vs-Map-300x200.webp 300w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/List-vs-Set-vs-Map-1024x683.webp 1024w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/List-vs-Set-vs-Map-768x512.webp 768w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/List-vs-Set-vs-Map-440x293.webp 440w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/List-vs-Set-vs-Map-680x453.webp 680w\" sizes=\"(max-width: 1536px) 100vw, 1536px\" \/><figcaption id=\"caption-attachment-22560\" class=\"wp-caption-text\">List vs Set vs Map<\/figcaption><\/figure>\n<hr \/>\n<h3>5. How does ArrayList differ from LinkedList?<\/h3>\n<p><strong>Answer:<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th>ArrayList<\/th>\n<th>LinkedList<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Uses dynamic array<\/td>\n<td>Uses doubly linked list<\/td>\n<\/tr>\n<tr>\n<td>Fast random access<\/td>\n<td>Slow random access<\/td>\n<\/tr>\n<tr>\n<td>Slow insertion\/deletion in middle<\/td>\n<td>Fast insertion\/deletion<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test <strong>performance awareness<\/strong>, not syntax.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cArrayList is better for read-heavy operations, while LinkedList suits frequent insertions and deletions.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nChoosing LinkedList without understanding its memory overhead.<\/p>\n<hr \/>\n<h3>6. What is the difference between ArrayList and Vector?<\/h3>\n<p><strong>Answer:<\/strong><\/p>\n<ul>\n<li><strong>ArrayList<\/strong>\n<ul>\n<li>Not synchronized<\/li>\n<li>Faster<\/li>\n<li>Preferred in modern applications<\/li>\n<\/ul>\n<\/li>\n<li><strong>Vector<\/strong>\n<ul>\n<li>Synchronized<\/li>\n<li>Thread-safe but slower<\/li>\n<li>Legacy class<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo check your understanding of <strong>thread safety and legacy APIs<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cVector is thread-safe but rarely used today because Concurrent collections offer better performance.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nUsing Vector just because it\u2019s thread-safe.<\/p>\n<hr \/>\n<h3>7. How does HashSet work internally?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nHashSet internally uses a <strong>HashMap<\/strong> to store elements.<br \/>\nEach element is stored as a key, with a constant dummy value.<\/p>\n<ul>\n<li>Uses hashing to ensure uniqueness<\/li>\n<li>Allows only one null value<\/li>\n<li>Order is not guaranteed<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test <strong>internal working knowledge<\/strong>, not surface-level usage.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cHashSet relies on hashCode() and equals() to prevent duplicates.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nSaying HashSet uses hashing but not explaining <strong>how uniqueness is checked<\/strong>.<\/p>\n<hr \/>\n<h3>8. What is the difference between HashSet and TreeSet?<\/h3>\n<p><strong>Answer:<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th>HashSet<\/th>\n<th>TreeSet<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>No ordering<\/td>\n<td>Sorted order<\/td>\n<\/tr>\n<tr>\n<td>Faster<\/td>\n<td>Slower<\/td>\n<\/tr>\n<tr>\n<td>Allows one null<\/td>\n<td>Does not allow null<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test <strong>trade-offs between performance and ordering<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cTreeSet uses Red-Black Tree internally and maintains natural or custom sorting.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nAssuming TreeSet is always better because it\u2019s sorted.<\/p>\n<hr \/>\n<h3>9. How does HashMap work internally in Java?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nHashMap stores data as <strong>key-value pairs<\/strong> using hashing.<\/p>\n<p>Process:<\/p>\n<ol>\n<li>hashCode() generates a hash<\/li>\n<li>Index is calculated<\/li>\n<li>Entry stored in bucket<\/li>\n<li>equals() resolves collisions<\/li>\n<\/ol>\n<p>From Java 8 onwards:<\/p>\n<ul>\n<li>Buckets convert to <strong>balanced trees<\/strong> after threshold<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nThis separates <strong>real Java developers from surface learners<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cJava 8 improved HashMap performance by converting long collision chains into trees.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nIgnoring hashCode() and equals() importance.<\/p>\n<figure id=\"attachment_22561\" aria-describedby=\"caption-attachment-22561\" style=\"width: 1536px\" class=\"wp-caption alignnone\"><img decoding=\"async\" class=\"size-full wp-image-22561\" src=\"https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/HashMap-Internal-Working-Diagram.webp\" alt=\"HashMap Internal Working Diagram\" width=\"1536\" height=\"1024\" srcset=\"https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/HashMap-Internal-Working-Diagram.webp 1536w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/HashMap-Internal-Working-Diagram-300x200.webp 300w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/HashMap-Internal-Working-Diagram-1024x683.webp 1024w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/HashMap-Internal-Working-Diagram-768x512.webp 768w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/HashMap-Internal-Working-Diagram-440x293.webp 440w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/HashMap-Internal-Working-Diagram-680x453.webp 680w\" sizes=\"(max-width: 1536px) 100vw, 1536px\" \/><figcaption id=\"caption-attachment-22561\" class=\"wp-caption-text\">HashMap Internal Working Diagram<\/figcaption><\/figure>\n<hr \/>\n<h3>10. What is the difference between HashMap and Hashtable?<\/h3>\n<p><strong>Answer:<\/strong><\/p>\n<ul>\n<li><strong>HashMap<\/strong>\n<ul>\n<li>Not synchronized<\/li>\n<li>Allows one null key<\/li>\n<li>Faster<\/li>\n<\/ul>\n<\/li>\n<li><strong>Hashtable<\/strong>\n<ul>\n<li>Synchronized<\/li>\n<li>No null key or value<\/li>\n<li>Legacy class<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo evaluate <strong>modern Java knowledge vs outdated practices<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cHashtable is largely replaced by ConcurrentHashMap in multithreaded environments.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nUsing Hashtable instead of concurrent collections.<\/p>\n<hr \/>\n<h3>11. What is the difference between HashMap and ConcurrentHashMap?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nHashMap is <strong>not thread-safe<\/strong> and does not provide any synchronization, which means multiple threads accessing it simultaneously can cause data inconsistency.<\/p>\n<p>ConcurrentHashMap is <strong>thread-safe<\/strong> and designed for high-concurrency environments. It allows multiple threads to read and write concurrently without locking the entire map.<\/p>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test understanding of <strong>concurrency and performance trade-offs<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cConcurrentHashMap uses finer-grained locking, which improves scalability compared to synchronized maps.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nSaying ConcurrentHashMap locks the entire map \u2014 it does not.<\/p>\n<hr \/>\n<h3>12. Why is HashMap not thread-safe?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nHashMap is not thread-safe because it does not synchronize access to its internal data structure. When multiple threads modify a HashMap concurrently, it can lead to <strong>race conditions, data corruption, or infinite loops during resizing<\/strong>.<\/p>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo see if you understand real-world multithreading risks.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cDuring rehashing, concurrent modification can corrupt the internal bucket structure.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nThinking read-only operations are always safe \u2014 resizing breaks that assumption.<\/p>\n<hr \/>\n<h3>13. What happens when duplicate keys are inserted into a HashMap?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nWhen a duplicate key is inserted into a HashMap, the <strong>existing value is replaced<\/strong> with the new value. The key itself is not duplicated.<\/p>\n<p>Key uniqueness is determined using <code class=\"\" data-line=\"\">hashCode()<\/code> and <code class=\"\" data-line=\"\">equals()<\/code>.<\/p>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo confirm understanding of <strong>key behavior and equality checks<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cHashMap allows duplicate values but not duplicate keys.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nThinking HashMap throws an exception for duplicate keys.<\/p>\n<hr \/>\n<h3>14. What is the difference between fail-fast and fail-safe iterators?<\/h3>\n<p><strong>Answer:<\/strong><\/p>\n<ul>\n<li><strong>Fail-fast iterators<\/strong>\n<ul>\n<li>Throw <code class=\"\" data-line=\"\">ConcurrentModificationException<\/code><\/li>\n<li>Do not allow modification during iteration<\/li>\n<li>Example: ArrayList, HashMap<\/li>\n<\/ul>\n<\/li>\n<li><strong>Fail-safe iterators<\/strong>\n<ul>\n<li>Do not throw exceptions<\/li>\n<li>Work on a cloned copy of the collection<\/li>\n<li>Example: ConcurrentHashMap<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo evaluate knowledge of <strong>iterator behavior and concurrency<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cFail-safe iterators trade memory for safety by iterating over a snapshot.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nAssuming fail-safe iterators reflect real-time updates \u2014 they don\u2019t.<\/p>\n<hr \/>\n<h3>15. What is an Iterator and how is it different from ListIterator?<\/h3>\n<p><strong>Answer:<\/strong><\/p>\n<ul>\n<li><strong>Iterator<\/strong>\n<ul>\n<li>Works with all Collection types<\/li>\n<li>Supports forward traversal only<\/li>\n<li>Can remove elements<\/li>\n<\/ul>\n<\/li>\n<li><strong>ListIterator<\/strong>\n<ul>\n<li>Works only with List implementations<\/li>\n<li>Supports forward and backward traversal<\/li>\n<li>Can add, remove, and update elements<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test <strong>API-level depth<\/strong>, not just usage.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cListIterator allows bidirectional traversal, which Iterator does not.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nUsing ListIterator with Set \u2014 not possible.<\/p>\n<hr \/>\n<h3>16. What is the difference between Comparable and Comparator?<\/h3>\n<p><strong>Answer:<\/strong><\/p>\n<ul>\n<li><strong>Comparable<\/strong>\n<ul>\n<li>Defines natural ordering<\/li>\n<li>Implemented by the class itself<\/li>\n<li>Method: <code class=\"\" data-line=\"\">compareTo()<\/code><\/li>\n<\/ul>\n<\/li>\n<li><strong>Comparator<\/strong>\n<ul>\n<li>Defines custom ordering<\/li>\n<li>Implemented externally<\/li>\n<li>Method: <code class=\"\" data-line=\"\">compare()<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test understanding of <strong>sorting strategies<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cComparator is preferred when multiple sorting strategies are required.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nThinking Comparator modifies the class \u2014 it doesn\u2019t.<\/p>\n<hr \/>\n<h3>17. How does TreeMap maintain sorting?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nTreeMap maintains keys in <strong>sorted order<\/strong> using a <strong>Red-Black Tree<\/strong> data structure.<\/p>\n<p>Sorting is based on:<\/p>\n<ul>\n<li>Natural ordering of keys, or<\/li>\n<li>A custom Comparator provided at creation<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test understanding of <strong>internal data structures<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cTreeMap guarantees O(log n) performance for basic operations.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nAssuming TreeMap sorts values \u2014 it sorts keys only.<\/p>\n<hr \/>\n<h3>18. What is the difference between Set and Map?<\/h3>\n<p><strong>Answer:<\/strong><\/p>\n<ul>\n<li><strong>Set<\/strong>\n<ul>\n<li>Stores only values<\/li>\n<li>Does not allow duplicates<\/li>\n<li>Example: HashSet<\/li>\n<\/ul>\n<\/li>\n<li><strong>Map<\/strong>\n<ul>\n<li>Stores key-value pairs<\/li>\n<li>Keys must be unique<\/li>\n<li>Example: HashMap<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test <strong>conceptual clarity<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cMap enforces uniqueness on keys, Set enforces uniqueness on values.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nCalling Map a type of Set \u2014 it is not.<\/p>\n<hr \/>\n<h3>19. What is the load factor in HashMap?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nThe load factor determines <strong>when a HashMap resizes<\/strong>.<\/p>\n<p>Default value: <strong>0.75<\/strong><\/p>\n<p>When the number of entries exceeds<br \/>\n<code class=\"\" data-line=\"\">capacity \u00d7 load factor<\/code>,<br \/>\nthe HashMap resizes and rehashes entries.<\/p>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test <strong>performance tuning knowledge<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cA higher load factor saves memory but increases collision risk.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nThinking load factor affects initial capacity \u2014 it doesn\u2019t.<\/p>\n<hr \/>\n<h3>20. What happens when a HashMap exceeds its capacity?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nWhen a HashMap exceeds its threshold, it:<\/p>\n<ol>\n<li>Creates a new internal array (usually double the size)<\/li>\n<li>Recalculates hash values<\/li>\n<li>Reassigns entries to new buckets<\/li>\n<\/ol>\n<p>This process is called <strong>rehashing<\/strong> and is computationally expensive.<\/p>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test understanding of <strong>runtime cost and optimization<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cPre-sizing HashMap reduces rehashing overhead in large-scale applications.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nIgnoring capacity planning in performance-critical systems.<\/p>\n<hr \/>\n<h3>21. Why are Map keys required to be immutable?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nMap keys should be immutable because HashMap and similar implementations rely on a key\u2019s <strong>hashCode() and equals()<\/strong> to store and retrieve entries.<\/p>\n<p>If a key changes after insertion:<\/p>\n<ul>\n<li>Its hashCode may change<\/li>\n<li>The entry may become unreachable<\/li>\n<li>Lookup operations may fail<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test understanding of <strong>data integrity and hashing behavior<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cImmutability guarantees consistent hashing and reliable key-based lookup.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nThinking immutability is enforced by Java \u2014 it\u2019s a design requirement, not a rule.<\/p>\n<hr \/>\n<h3>22. What is the difference between synchronized collections and concurrent collections?<\/h3>\n<p><strong>Answer:<\/strong><\/p>\n<ul>\n<li><strong>Synchronized collections<\/strong>\n<ul>\n<li>Achieved using <code class=\"\" data-line=\"\">Collections.synchronizedList()<\/code> or similar<\/li>\n<li>Lock the entire collection<\/li>\n<li>Lower performance in high-concurrency scenarios<\/li>\n<\/ul>\n<\/li>\n<li><strong>Concurrent collections<\/strong>\n<ul>\n<li>Designed for multithreading<\/li>\n<li>Use fine-grained locking or lock-free algorithms<\/li>\n<li>Higher scalability and performance<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo evaluate <strong>concurrency design choices<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cConcurrent collections reduce contention and allow parallel read\/write operations.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nAssuming synchronized collections scale well \u2014 they don\u2019t.<\/p>\n<figure id=\"attachment_22562\" aria-describedby=\"caption-attachment-22562\" style=\"width: 1536px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-22562\" src=\"https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/Thread-Safety-Performance-Comparison.webp\" alt=\"Thread Safety &amp; Performance Comparison\" width=\"1536\" height=\"1024\" srcset=\"https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/Thread-Safety-Performance-Comparison.webp 1536w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/Thread-Safety-Performance-Comparison-300x200.webp 300w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/Thread-Safety-Performance-Comparison-1024x683.webp 1024w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/Thread-Safety-Performance-Comparison-768x512.webp 768w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/Thread-Safety-Performance-Comparison-440x293.webp 440w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2026\/01\/Thread-Safety-Performance-Comparison-680x453.webp 680w\" sizes=\"(max-width: 1536px) 100vw, 1536px\" \/><figcaption id=\"caption-attachment-22562\" class=\"wp-caption-text\">Thread Safety &amp; Performance Comparison<\/figcaption><\/figure>\n<hr \/>\n<h3>23. What is WeakHashMap and when should it be used?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nWeakHashMap stores keys using <strong>weak references<\/strong>. If a key is no longer referenced elsewhere, it becomes eligible for garbage collection.<\/p>\n<p>Use cases:<\/p>\n<ul>\n<li>Caching<\/li>\n<li>Metadata storage<\/li>\n<li>Memory-sensitive mappings<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test understanding of <strong>memory management<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cWeakHashMap helps prevent memory leaks in cache-like structures.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nUsing WeakHashMap where data persistence is required.<\/p>\n<hr \/>\n<h3>24. What is EnumMap and when should it be used?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nEnumMap is a specialized Map implementation where <strong>keys must be enum constants<\/strong>.<\/p>\n<p>Features:<\/p>\n<ul>\n<li>Very fast<\/li>\n<li>Low memory overhead<\/li>\n<li>Maintains natural enum order<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test awareness of <strong>specialized collections<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cEnumMap is faster than HashMap because it uses array-based storage internally.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nUsing EnumMap with non-enum keys.<\/p>\n<hr \/>\n<h3>25. What is the difference between Queue and Deque?<\/h3>\n<p><strong>Answer:<\/strong><\/p>\n<ul>\n<li><strong>Queue<\/strong>\n<ul>\n<li>Typically FIFO<\/li>\n<li>Insert at rear, remove from front<\/li>\n<li>Example: PriorityQueue<\/li>\n<\/ul>\n<\/li>\n<li><strong>Deque<\/strong>\n<ul>\n<li>Double-ended queue<\/li>\n<li>Insert and remove from both ends<\/li>\n<li>Example: ArrayDeque<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test understanding of <strong>data access patterns<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cDeque can be used as both a stack and a queue.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nAssuming Queue supports stack operations \u2014 it doesn\u2019t.<\/p>\n<hr \/>\n<h3>26. How does PriorityQueue work internally?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nPriorityQueue uses a <strong>binary heap<\/strong> data structure.<\/p>\n<p>Characteristics:<\/p>\n<ul>\n<li>Elements ordered by priority<\/li>\n<li>Head is always the highest (or lowest) priority element<\/li>\n<li>Insertion and removal take O(log n)<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test <strong>internal data structure knowledge<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cPriorityQueue does not sort the entire collection \u2014 only the head is guaranteed.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nExpecting PriorityQueue to iterate in sorted order.<\/p>\n<hr \/>\n<h3>27. What is the difference between remove(), poll(), and peek() in Queue?<\/h3>\n<p><strong>Answer:<\/strong><\/p>\n<ul>\n<li><strong>remove()<\/strong>\n<ul>\n<li>Retrieves and removes head<\/li>\n<li>Throws exception if empty<\/li>\n<\/ul>\n<\/li>\n<li><strong>poll()<\/strong>\n<ul>\n<li>Retrieves and removes head<\/li>\n<li>Returns null if empty<\/li>\n<\/ul>\n<\/li>\n<li><strong>peek()<\/strong>\n<ul>\n<li>Retrieves head without removing<\/li>\n<li>Returns null if empty<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test <strong>API-level precision<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cpoll() is safer than remove() when queue may be empty.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nUsing remove() without empty checks.<\/p>\n<hr \/>\n<h3>28. What are immutable collections in Java?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nImmutable collections are collections whose contents <strong>cannot be modified after creation<\/strong>.<\/p>\n<p>Benefits:<\/p>\n<ul>\n<li>Thread-safe by default<\/li>\n<li>Prevent accidental modification<\/li>\n<li>Improve predictability<\/li>\n<\/ul>\n<p>Examples:<\/p>\n<ul>\n<li><code class=\"\" data-line=\"\">List.of()<\/code><\/li>\n<li><code class=\"\" data-line=\"\">Set.of()<\/code><\/li>\n<li><code class=\"\" data-line=\"\">Map.of()<\/code><\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test modern Java knowledge.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cImmutable collections are ideal for configuration and shared data.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nTrying to modify immutable collections at runtime.<\/p>\n<hr \/>\n<h3>29. How can you make a collection thread-safe?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nThere are multiple ways to make collections thread-safe:<\/p>\n<ul>\n<li>Use synchronized wrappers<\/li>\n<li>Use concurrent collections<\/li>\n<li>Use immutable collections<\/li>\n<li>Apply external synchronization<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo evaluate <strong>real-world multithreading strategy<\/strong>.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cConcurrent collections are preferred for high-concurrency systems.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nSynchronizing everything \u2014 leads to performance bottlenecks.<\/p>\n<hr \/>\n<h3>30. Which Java collection should be used in high-performance applications and why?<\/h3>\n<p><strong>Answer:<\/strong><br \/>\nThere is no single best collection \u2014 it depends on the use case.<\/p>\n<p>General guidelines:<\/p>\n<ul>\n<li>ArrayList for fast reads<\/li>\n<li>HashMap for fast lookups<\/li>\n<li>ConcurrentHashMap for concurrency<\/li>\n<li>ArrayDeque for stack\/queue operations<\/li>\n<\/ul>\n<p><strong>Why interviewers ask:<\/strong><br \/>\nTo test <strong>decision-making ability<\/strong>, not memorization.<\/p>\n<p>\ud83e\udde0 <strong>What impresses interviewers:<\/strong><br \/>\n\ud83d\udc49 \u201cChoosing the right collection is about access patterns, not popularity.\u201d<\/p>\n<p>\ud83d\udeab <strong>Common mistake:<\/strong><br \/>\nUsing HashMap everywhere without analysis.<\/p>\n<hr \/>\n<h2>Conclusion<\/h2>\n<p>Mastering <strong>Java Collection Framework interview questions<\/strong> is not about memorizing APIs \u2014 it\u2019s about demonstrating how you think about <strong>data handling, performance, scalability, and concurrency<\/strong>. These questions allow interviewers to see whether you can build systems that survive real production traffic, not just pass coding tests.<\/p>\n<p>Developers who deeply understand Java collections write cleaner code, avoid performance bottlenecks, and make smarter architectural decisions. Whether you\u2019re preparing for a fresher role or a senior Java position, strong collection knowledge directly improves your interview confidence and job outcomes.<\/p>\n<p>To truly stand out, don\u2019t just read these questions \u2014 <strong>apply them in real projects<\/strong>, analyze time complexity, experiment with concurrent collections, and refactor older code using better data structures. That\u2019s how you move from being a Java programmer to a Java engineer.<\/p>\n<hr \/>\n<h2>Frequently Asked Questions<\/h2>\n<h3>What is the Java Collection Framework used for?<\/h3>\n<p>The Java Collection Framework is used to store, manage, manipulate, and retrieve groups of objects efficiently using standardized data structures like lists, sets, queues, and maps.<\/p>\n<h3>Are Java Collection Framework questions important for interviews?<\/h3>\n<p>Yes. Java Collection Framework questions are among the most frequently asked topics in Java interviews because they test real-world coding, performance awareness, and system-level thinking.<\/p>\n<h3>How many Java collection questions should I prepare for interviews?<\/h3>\n<p>Preparing the <strong>top 25\u201330 Java Collection Framework interview questions<\/strong> is usually sufficient for most product-based and service-based company interviews.<\/p>\n<h3>Is Java Collection Framework required for freshers?<\/h3>\n<p>Absolutely. Freshers are often tested on basic collections like <code class=\"\" data-line=\"\">ArrayList<\/code>, <code class=\"\" data-line=\"\">HashMap<\/code>, <code class=\"\" data-line=\"\">Set<\/code>, and <code class=\"\" data-line=\"\">Iterator<\/code> to assess foundational Java skills.<\/p>\n<h3>What level of Java collections knowledge is expected for experienced developers?<\/h3>\n<p>Experienced developers are expected to understand internal working, thread safety, concurrency, performance trade-offs, and real-world usage of collections.<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<h2>\ud83d\udd17 Related Reads<\/h2>\n<ul>\n<li><strong><a href=\"https:\/\/www.kaashivinfotech.com\/blog\/oops-interview-questions\/\">OOPs Interview Questions: 30 Powerful Answers That Will Skyrocket Your Career in 2025<\/a><\/strong><br \/>\nMaster core OOP concepts with real interview-ready explanations, examples, and common traps freshers often miss.<\/li>\n<li><strong><a href=\"https:\/\/www.kaashivinfotech.com\/blog\/java-spring-boot-interview-questions\/\">Spring Boot Interview Questions: 30 Must-Know Answers to Easily Crack Your Next Java Job in 2026<\/a><\/strong><br \/>\nCovers real-world Spring Boot scenarios, annotations, architecture, and production-level interview questions.<\/li>\n<li><strong><a href=\"https:\/\/www.kaashivinfotech.com\/blog\/full-stack-java-interview-questions-for-fresher-with-answers\/\">Top 25 Java Full Stack Developer Interview Questions for Freshers \u2013 2025 Guide<\/a><\/strong><br \/>\nA curated full-stack roadmap covering Java, Spring, REST APIs, databases, and frontend basics.<\/li>\n<li><strong><a href=\"https:\/\/www.kaashivinfotech.com\/blog\/java-interview-questions-for-fresher-with-answers\/\">Java Interview Questions for Freshers with Answers<\/a><\/strong><br \/>\nBeginner-friendly Java interview questions explained clearly, ideal for first-time job seekers.<\/li>\n<li><strong><a href=\"https:\/\/wikitechy.com\/engineering-interview-questions-and-answers\/computer-science-engineering\/java-interview-questions-and-answers-part1\" target=\"_blank\" rel=\"noopener\">Top 50 Java Interview Questions and Answers \u2013 Part 1<\/a><\/strong><br \/>\nA classic Java interview resource covering fundamentals, syntax, and commonly asked theory questions.<\/li>\n<li><strong><a href=\"https:\/\/www.wikitechy.com\/interview-questions\/tag\/oops-interview-questions-in-java\/\" target=\"_blank\" rel=\"noopener\">OOPs Interview Questions in Java \u2013 Concept-Wise Practice<\/a><\/strong><br \/>\nTopic-tagged OOPs questions in Java for quick revision and focused concept reinforcement.<\/li>\n<\/ul>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Java Collection Framework interview questions have become a decisive filter in modern Java interviews \u2014 especially for backend, full-stack, and enterprise roles. Today, companies don\u2019t just test whether you can write Java code; they evaluate how efficiently you manage data, choose the right data structure, and design performance-aware solutions. Many candidates fail Java interviews not [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":22563,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[724],"tags":[11867,11874,11865,11863,11873,11871,7497,11872,11864,11879,11877,11880,11870,11876,11875,11866,781,11869,11878,11881,11868],"class_list":["post-22551","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interview-questions","tag-java-arraylist-interview-questions","tag-java-backend-interview-questions","tag-java-collection-framework","tag-java-collection-framework-interview-questions","tag-java-collections-advanced-interview-questions","tag-java-collections-for-beginners","tag-java-collections-framework","tag-java-collections-internal-working","tag-java-collections-interview-questions","tag-java-collections-java-8","tag-java-collections-performance","tag-java-collections-real-world-usage","tag-java-concurrenthashmap-interview-questions","tag-java-data-structures-interview-questions","tag-java-developer-interview-prep","tag-java-hashmap-interview-questions","tag-java-interview-questions","tag-java-map-interview-questions","tag-java-multithreading-collections-java","tag-java-programming-interview-questions","tag-java-set-interview-questions"],"_links":{"self":[{"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/posts\/22551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/comments?post=22551"}],"version-history":[{"count":0,"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/posts\/22551\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/media\/22563"}],"wp:attachment":[{"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/media?parent=22551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/categories?post=22551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/tags?post=22551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}