{"id":79180,"date":"2020-06-23T09:00:51","date_gmt":"2020-06-23T03:30:51","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=79180"},"modified":"2020-06-23T09:00:51","modified_gmt":"2020-06-23T03:30:51","slug":"hashmap-vs-hashset-in-java","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/","title":{"rendered":"HashMap vs HashSet in Java"},"content":{"rendered":"<p>We are going to discuss the differences between HashSet vs HashMap in this article. These are two of the most important Collection classes in Java. They are present in the java.util package. We use both of them for serving various purposes of data structures.<\/p>\n<p>This topic is really important and this question is frequently asked in many interviews. Hence, you must thoroughly know about them and the differences between them. Before discussing the differences, we will first look at their introduction and discuss them separately.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/HashMap-vs-HashSet.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79181\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/HashMap-vs-HashSet.jpg\" alt=\"HashMap vs HashSet\" width=\"802\" height=\"420\" \/><\/a><\/p>\n<h3>What is a HashSet in Java?<\/h3>\n<p>HashSet is a collection framework that implements the Set interface and does not allow any duplicate values. All the objects stored in the HashSet must override the equals() and hashCode() methods so that we can check for duplicate values.<\/p>\n<p>The HashSet is not thread safe and is not synchronized. There is a method add() which adds elements in a HashSet.<\/p>\n<p>The syntax of this method is:<\/p>\n<p><strong>public boolean add(Object obj)<\/strong><\/p>\n<p>This method returns a boolean value. It returns true if the element is unique and adds the element successfully, and returns false if there is a duplicate value added to the HashSet.<\/p>\n<p>For example:<\/p>\n<p><strong>HashSet vehicleSet = new HashSet();<\/strong><br \/>\n<strong>vehicleSet.add(\u201cCar\u201d);<\/strong><br \/>\n<strong>vehicleSet.add(\u201cMotorcycle\u201d);<\/strong><br \/>\n<strong>vehicleSet.add(\u201cBus\u201d);<\/strong><\/p>\n<h3>What is a HashMap in Java?<\/h3>\n<p>A HashMap is a Hash table that implements the Map interface and maps a key to value. HashMap also does not allow duplicate keys but allows duplicate values in it. The map interface has two implementation classes which are Treemap and the HashMap.<\/p>\n<p>The difference between both is that the TreeMap maintains the order of objects but the HashMap does not maintain the order of objects. The HashMap is not thread-safe and is not synchronized. It does not allow duplicate values but it allows the null values.<\/p>\n<p>To add the elements in a Hashmap, the put() method which accepts a key and a value.<\/p>\n<p>Its syntax is:<\/p>\n<p><strong>public Object put(Object key, Object value)<\/strong><\/p>\n<p>For example:<\/p>\n<p><strong>HashMap&lt;Integer, String&gt; vehicleHashMap = new HashMap&lt;Integer, String&gt;();<\/strong><br \/>\n<strong>vehicleHashMAp.put( 1, \u201cCar\u201d );<\/strong><br \/>\n<strong>vehicleHashMAp.put( 2, \u201cMotorcycle\u201d );<\/strong><br \/>\n<strong>vehicleHashMAp.put( 3, \u201cBus\u201d );<\/strong><\/p>\n<p>So, this was a brief introduction to both HashSet and HashMap. We came to know that both are not thread-safe and synchronized.<\/p>\n<p>Now, let\u2019s discuss the differences between them.<\/p>\n<h3>Java HashSet Vs HashMap<\/h3>\n<p>We will discuss each difference with a specific parameter:<\/p>\n<h4>1. Implementation Hierarchy<\/h4>\n<p>The HashSet implements the Set interface of Java while the HashMap implements the Map interface. The Set interface extends the Collection interface which is the top-level interface of the Java Collection framework, while the Map interface does not extend any interface.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/HashSet.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79182\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/HashSet.jpg\" alt=\"HashSet in java\" width=\"292\" height=\"295\" \/><\/a><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/HashMap.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79183\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/HashMap.jpg\" alt=\"HashMap in java\" width=\"278\" height=\"313\" \/><\/a><\/p>\n<h4>2. Data Storage<\/h4>\n<p>The HashSet stores the data in the form of objects, while the HashMap stores the data in the form of key-value pairs. In HashMap, we can retrieve each value using the key.<\/p>\n<p><strong>For example:<\/strong><\/p>\n<p>HashSet&lt;String&gt; hs = new HashSet&lt;String&gt;();<br \/>\nhs.add(\u201cJava\u201d);<\/p>\n<p>HashMap&lt;Integer, String&gt; hm = new HashMap&lt;Integer, String&gt;();<br \/>\nhm.put(1, \u201cJava\u201d);<\/p>\n<h4>3. Duplicate Values<\/h4>\n<p>HashSet does not allow you to add duplicate values. But HasMap stores the key-value pairs and allows the duplicate keys but not duplicate values. If we add the duplicate key, then it uses the new value with that key.<\/p>\n<h4>4. Null Values<\/h4>\n<p>HashSet allows a single null value; after adding a null value, HashSet does not allow to add more null values. On the other hand, HashMap allows multiple null values but a single null key.<\/p>\n<h4>5. Internal Implementation<\/h4>\n<p>HashSet internally implements the HashMap, while HasMap does neither implement a HashSet or any Set.<\/p>\n<h4>6. Methods to Insert Elements<\/h4>\n<p>There are predefined methods for both HashSet and HashMap to store or add elements. The add() method adds elements in a HashSet while the put() method adds or stores elements in a HashMap. While using the add method, we directly pass the value in the form of an object.<\/p>\n<p>But when using the put() method, we need to pass the key as well as the value to add the element in a HashSet.<\/p>\n<h4>7. Mechanism to Add Elements<\/h4>\n<p>HashMap internally uses a hashing method to store the elements. On the other hand, the HashSet uses the HashMap object to store or add the elements.<\/p>\n<h4>8. Performance<\/h4>\n<p>The speed of HashSet is slower than that of HashMap. The reason that HashMap is faster than HashSet is that the HashMap uses the unique keys to access the values. It stores each value with a corresponding key and we can retrieve these values faster using keys during iteration.<\/p>\n<p>While HashSet is completely based on objects and therefore retrieval of values is slower.<\/p>\n<h4>9. Dummy Values<\/h4>\n<p>As we know that HashSet uses the HashMap to add elements. In HashSet, we pass the elements in the add(Object) method, and the argument passed in this method acts as a key. Java internally uses dummy values for each value passed in the add method.<\/p>\n<h4>10. Example<\/h4>\n<p>Let\u2019s see the examples of HashSet and HashMap.<\/p>\n<ul>\n<li><strong>HashSet-<\/strong> {1,2,3,4} or {\u201cJava\u201d, \u201cC++\u201d, \u201cPython\u201d}<\/li>\n<li><strong>HashMap-<\/strong> {a-&gt;1, b-&gt;2, c-&gt;3,d-&gt;4} or{1-&gt;\u201dJava\u201d, 2-&gt;\u201dPython\u201d, 3-&gt;\u201cC++\u201d}<\/li>\n<\/ul>\n<h3>HashSet vs HashMap in Java in Tabular Form<\/h3>\n<p>After discussing the differences, we will compare them in the tabular form. The differences are given below:<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Parameter<\/b><\/td>\n<td><b>HashSet<\/b><\/td>\n<td><b>HashMap<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Implementation<\/b><\/td>\n<td><span style=\"font-weight: 400\">Implements Set interface<\/span><\/td>\n<td><span style=\"font-weight: 400\">Implements Map Interface<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Stores<\/b><\/td>\n<td><span style=\"font-weight: 400\">Objects<\/span><\/td>\n<td><span style=\"font-weight: 400\">Key-Value pairs<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Duplicate values<\/b><\/td>\n<td><span style=\"font-weight: 400\">HashSet does not allow duplicate values.<\/span><\/td>\n<td><span style=\"font-weight: 400\">HashMap allows duplicate keys but does not allow duplicate values.<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Null Values<\/b><\/td>\n<td><span style=\"font-weight: 400\">Single Null value allowed<\/span><\/td>\n<td><span style=\"font-weight: 400\">A single null key but multiple null values are allowed.<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Method to insert elements<\/b><\/td>\n<td><span style=\"font-weight: 400\">We use the add() method that inserts the\u00a0 elements in the HashSet.<\/span><\/td>\n<td><span style=\"font-weight: 400\">We use the put() method to insert elements in the HashMap.<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Number of objects<\/b><\/td>\n<td><span style=\"font-weight: 400\">We can create only one object\u00a0 during the addition of elements.<\/span><\/td>\n<td><span style=\"font-weight: 400\">We create two objects during addition of objects.<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Performance<\/b><\/td>\n<td><span style=\"font-weight: 400\">Slower<\/span><\/td>\n<td><span style=\"font-weight: 400\">Faster<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Uses<\/b><\/td>\n<td><span style=\"font-weight: 400\">The use of HashSet is to maintain the uniqueness of data<\/span><\/td>\n<td><span style=\"font-weight: 400\">The use of hashMap is when the uniqueness of data is not much important.\u00a0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Examples to understand Difference Between HashSet and HashMap in Java<\/h4>\n<p>Now, we will understand HashSet and HashMap with the help of Java programs:<\/p>\n<p><strong>Code to understand Java HashSet:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.hahssetvshashmap;\nimport java.util.HashSet;\npublic class HashSetDemo {\n  public static void main(String[] args) {\n    \/\/ Create a HashSet\n    HashSet &lt; String &gt; hset = new HashSet &lt; String &gt; ();\n\n    \/\/add elements to HashSet using add() method\n    hset.add(\"Java\");\n    hset.add(\"Python\");\n    hset.add(\"Ruby\");\n    hset.add(\"C++\");\n\n    \/\/ Displaying HashSet elements\n    System.out.println(\"HashSet contains:\\n\" + hset);\n    \/\/Adding duplicate values\n    hset.add(\"Java\");\n    hset.add(\"Ruby\");\n    System.out.println(\"After adding duplicate values, HashSet contains:\\n\" + hset);\n    \/\/Adding null values to HashSet\n    hset.add(null);\n    System.out.println(\"After adding null values for the first time, HashSet contains:\\n\" + hset);\n    hset.add(null);\n    System.out.println(\"After adding null values for the second time, HashSet contains:\\n\" + hset);\n  }\n}<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">HashSet contains:<br \/>\n[Java, C++, Ruby, Python]<br \/>\nAfter adding duplicate values, HashSet contains:<br \/>\n[Java, C++, Ruby, Python]<br \/>\nAfter adding null values for the first time, HashSet contains:<br \/>\n[null, Java, C++, Ruby, Python]<br \/>\nAfter adding null values for the second time, HashSet contains:<br \/>\n[null, Java, C++, Ruby, Python]<\/div>\n<p><strong>Code to understand Java HashMap:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.hahssetvshashmap;\nimport java.util.HashMap;\npublic class HashMapDemo {\n  public static void main(String[] args) {\n    \/\/ Creating a HashMap\n    HashMap &lt; Integer,\n    String &gt; hmap = new HashMap &lt; Integer,\n    String &gt; ();\n\n    \/\/add elements to HashMap using put() method\n    hmap.put(1, \"Java\");\n    hmap.put(2, \"Python\");\n    hmap.put(3, \"Ruby\");\n    hmap.put(4, \"C++\");\n\n    \/\/ Displaying HashMap elements\n    System.out.println(\"HashMap contains:\\n\" + hmap);\n\n    \/\/Adding duplicate values to a HashMap\n    hmap.put(4, \"JavaScript\");\n    System.out.println(\"After adding duplicate values, HashSet contains:\\n\" + hmap);\n  }\n}<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">HashMap contains:<br \/>\n{1=Java, 2=Python, 3=Ruby, 4=C++}<br \/>\nAfter adding duplicate values, HashSet contains:<br \/>\n{1=Java, 2=Python, 3=Ruby, 4=JavaScript}<\/div>\n<h3>When to use HashSet and HashMap in Java?<\/h3>\n<p>We should prefer to use HashSet rather than Hashmap when we want to maintain the uniqueness in the Collection object. In all other cases, we should use HashMap over HashSet as its performance is better than HashSet.<\/p>\n<h3>Conclusion<\/h3>\n<p>In this article, we discussed every difference between HashSet and HashMap. We use both of them as a Collection class in Java. HashSet implements Set interface and works internally like HashMap, while HashMap implements the Map interface.<\/p>\n<p>The HashMap should be always preferred to use unless there is a need to maintain the uniqueness of elements in the Collection.<\/p>\n<p><strong>Hope Hashset vs Hashmap is clear to you. Do share your feedback in the comment section.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are going to discuss the differences between HashSet vs HashMap in this article. These are two of the most important Collection classes in Java. They are present in the java.util package. We use&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":79181,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[183],"tags":[2926,2927,2928],"class_list":["post-79180","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-difference-between-hashmap-and-hashset","tag-difference-between-hashset-and-hashmap","tag-hashmap-vs-hashset"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>HashMap vs HashSet in Java - TechVidvan<\/title>\n<meta name=\"description\" content=\"Learn HashMap vs HashSet in Java. Understand what is hashset and hashmap in java and differences between java hashmap and hashset with examples and coding.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HashMap vs HashSet in Java - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Learn HashMap vs HashSet in Java. Understand what is hashset and hashmap in java and differences between java hashmap and hashset with examples and coding.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-23T03:30:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/HashMap-vs-HashSet.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HashMap vs HashSet in Java - TechVidvan","description":"Learn HashMap vs HashSet in Java. Understand what is hashset and hashmap in java and differences between java hashmap and hashset with examples and coding.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/","og_locale":"en_US","og_type":"article","og_title":"HashMap vs HashSet in Java - TechVidvan","og_description":"Learn HashMap vs HashSet in Java. Understand what is hashset and hashmap in java and differences between java hashmap and hashset with examples and coding.","og_url":"https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2020-06-23T03:30:51+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/HashMap-vs-HashSet.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"HashMap vs HashSet in Java","datePublished":"2020-06-23T03:30:51+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/"},"wordCount":1224,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/HashMap-vs-HashSet.jpg","keywords":["difference between hashmap and hashset","difference between hashset and hashmap","HashMap vs HashSet"],"articleSection":["Java Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/","url":"https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/","name":"HashMap vs HashSet in Java - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/HashMap-vs-HashSet.jpg","datePublished":"2020-06-23T03:30:51+00:00","description":"Learn HashMap vs HashSet in Java. Understand what is hashset and hashmap in java and differences between java hashmap and hashset with examples and coding.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/HashMap-vs-HashSet.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/HashMap-vs-HashSet.jpg","width":802,"height":420,"caption":"HashMap vs HashSet"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/hashmap-vs-hashset-in-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"HashMap vs HashSet in Java"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/79180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=79180"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/79180\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/79181"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=79180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=79180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=79180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}