{"id":77643,"date":"2020-04-07T14:20:17","date_gmt":"2020-04-07T08:50:17","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=77643"},"modified":"2020-04-07T14:20:17","modified_gmt":"2020-04-07T08:50:17","slug":"autoboxing-and-unboxing-in-java","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/autoboxing-and-unboxing-in-java\/","title":{"rendered":"Autoboxing and Unboxing in Java- When and how to do it?"},"content":{"rendered":"<p>In this java tutorial, we are going to learn autoboxing and unboxing in Java. We have briefly discussed this topic in our tutorial of Java wrapper classes. Java introduced the concept of Autoboxing and Unboxing since Java 5.<\/p>\n<p>Using this concept we can interchangeably convert the primitive data types into their respective wrapper classes.<\/p>\n<p>Let\u2019s start discussing what is autoboxing and unboxing in Java.<\/p>\n<h3>What is Autoboxing and Unboxing in Java<\/h3>\n<h4>Autoboxing<\/h4>\n<p>Autoboxing in Java is a process of converting a <em><strong>primitive data type<\/strong><\/em> into an object of its corresponding wrapper class. For example, converting int to Integer class, long to Long class or double to Double class, etc.<\/p>\n<h4>When Autoboxing in Java occurs?<\/h4>\n<p>The Java compiler applies autoboxing under three cases:<\/p>\n<h5>Case 1<\/h5>\n<p>When we pass a primitive data type as a parameter to a method but that method expects an object of the wrapper class related to that primitive data type.<\/p>\n<p><strong>Code to explain this case:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.autoboxing;\npublic class Example1\n{\n    public static void myMethod(Integer num)\n    {\n        System.out.println(num);\n    }\n    public static void main(String[] args)\n    {\n        \/\/passed int (primitive type), but compiler automatically converts it to the Integer object.\n        myMethod(5);\n    }\n}\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">5<\/div>\n<h5>Case 2<\/h5>\n<p>When we assign a primitive data type to a variable of its corresponding wrapper class.<\/p>\n<p><strong>Code to explain this case:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.autoboxing;\npublic class Example2\n{\n    public static void main(String[] args)\n    {\n        Integer inum = 3; \/\/Assigning int to Integer: Autoboxing\n        Long lnum = 32L; \/\/Assigning long to Long: Autoboxing\n        System.out.println(inum);\n        System.out.println(lnum);   \n    }\n}\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">3<br \/>\n32<\/div>\n<h5>Case 3<\/h5>\n<p>When we work with <em><strong>collection framework <\/strong><\/em>classes, the compiler performs autoboxing in java.<\/p>\n<p>For example, the framework ArrayList class expects an object of Integer wrapper class but we are passing the int primitive data type, so here compiler will automatically convert the int data type into the object of Integer wrapper class.<\/p>\n<p><strong>Code to explain this case:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.autoboxing;\nimport java.util.ArrayList;\npublic class Example3\n{\n    public static void main(String[] args)\n    {\n        ArrayList&lt;Integer&gt; arrayList = new ArrayList&lt;Integer&gt;();\n        \/\/Autoboxing: int primitive to Integer\n        arrayList.add(11);\n        arrayList.add(22);\n        System.out.println(arrayList);\n    }\n}\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">[11, 22]<\/div>\n<h4>Unboxing<\/h4>\n<p>Unboxing in Java is an automatic conversion of an object of a wrapper class to the value of its respective primitive data type by the compiler.<\/p>\n<p>It is the opposite technique of Autoboxing. For example converting\u00a0 Integer class to int datatype, converting Double class into double data type, etc.<\/p>\n<h4>When Unboxing in Java occurs?<\/h4>\n<p>The Java compiler applies unboxing under three cases:<\/p>\n<h5>Case 1<\/h5>\n<p>When we pass an object of a wrapper class as a parameter to a method but that method expects a value of the corresponding primitive type.<\/p>\n<p><strong>Code to explain this case:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.unboxing;\npublic class Example1\n{\n    public static void myMethod(int num)\n    {\n        System.out.println(num);\n    }\n    public static void main(String[] args)\n    {\n        Integer intObject = new Integer(100);\n        \/\/ passed Integer wrapper class object, would be converted to int primitive type\n        myMethod(intObject );\n    }\n}\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">100<\/div>\n<h5>Case 2<\/h5>\n<p>When we assign an object of the wrapper class to its respective primitive datatype.<\/p>\n<p><strong>Code to explain this case:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.unboxing;\npublic class Example2\n{   \n    public static void main(String[] args)\n    {\n        Integer intObject = new Integer(5);\n        int num = intObject; \/\/unboxing object to primitive type\n        System.out.println(num);\n    }\n}\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">5<\/div>\n<h5>Case 3<\/h5>\n<p>While dealing with collection classes.<\/p>\n<p><strong>Code to explain this case:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.unboxing;\nimport java.util.ArrayList;\npublic class Example1\n{   \n    public static void main(String[] args)\n    {\n        ArrayList&lt;Integer&gt; arrayList = new ArrayList&lt;Integer&gt;();\n        arrayList.add(10);\n        int num = (int) arrayList.get(0);\n\/\/ unboxing because get method returns an Integer object\n        System.out.println(num);\n    }\n}\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">10<\/div>\n<h4>Advantage of Autoboxing and Unboxing in Java<\/h4>\n<p>A Java programmer does not need to explicitly or manually write the code to convert primitive data to the wrapper class object and vice versa. Java compiler automatically performs autoboxing and unboxing as and when needed.<\/p>\n<h4>List of primitive data types and their respective wrapper classes<\/h4>\n<p>The following table shows the\u00a0 primitive types and their corresponding wrapper classes, which the Java compiler uses to perform Autoboxing and Unboxing:<\/p>\n<h5>Different Examples of Autoboxing and Unboxing<\/h5>\n<h5>Example 1<\/h5>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.conversion;\npublic class TechVidvan\n{\n    public static void main (String[] args)\n    {\n        \/\/ creating an Integer Object with value 10.\n        Integer intObject = new Integer(10);\n\n        \/\/ unboxing the Object\n        int intDataType = intObject;\n\n        System.out.println(\"Value of object of Character class: \" + intObject);\n        System.out.println(\"Value of char data type: \" + intDataType);\n\n        \/\/Autoboxing of char\n        Character charObject = 'a';\n\n        \/\/ Auto-unboxing of Character\n        char charDataType = charObject;\n\n        System.out.println(\"Value of object of Integer class: \" + charDataType);\n        System.out.println(\"Value of int data type: \" + charObject);\n    }\n}\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Value of object of Character class: 10<br \/>\nValue of char data type: 10<br \/>\nValue of object of Integer class: a<br \/>\nValue of int data type: a<\/div>\n<h5>Example 2<\/h5>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.conversion;\nimport java.util.ArrayList;\npublic class TechVidvan\n{\n    public static void main (String[] args)\n    {\n\/\/Creating a list of elements of Integer type and adding the int type values        ArrayList&lt;Integer&gt; list = new ArrayList&lt;Integer&gt;();\n  \n      for (int i = 0; i &lt; 10; i++)\n            list.add(i);\n            System.out.println(list);\n    }\n} \n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]<\/div>\n<p><strong>Example 3:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.conversion;\nimport java.io.*;\nimport java.util.*;\npublic class TechVidvan\n{\n    \/\/ Java program find sum of first 10 numbers using autoboxing and unboxing\n\n    public static int sumOfNumbers(List&lt;Integer&gt; list)\n    {\n        int sum = 0;\n        for (Integer num : list)\n        {\n            \/\/ unboxing of i automatically\n            sum += num;\n            \/\/unboxing of num is done automatically using intvalue implicitly\n        }\n        return sum;\n    }\n\n    public static void main (String[] args)\n    {\n\/* Creating a list Integer type elements and adding the int values to the list*\/\n\n        List&lt;Integer&gt; list = new ArrayList&lt;Integer&gt;();\n        for (int i = 0; i &lt; 10; i++)\n            list.add(i);\n\n        \/\/ getting the sum of all odd no. in the list.\n        int sum = sumOfNumbers(list);\n        System.out.println(\"Sum of first 10 numbers is = \" + sum);\n    }\n}\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Sum of first 10 numbers is = 45<\/div>\n<h4>Things to Remember while using Autoboxing and Unboxing in Java<\/h4>\n<p>Till now we discussed what Autoboxing and Unboxing are in Java and the cases when it occurs. But there are some precautions that you need to take care of while using Autoboxing and Unboxing in Java. Let\u2019s discuss these cases:<\/p>\n<h5>1. Comparing Objects with equality Operator<\/h5>\n<p>There are few situations where java autoboxing is error-prone for example,\u00a0 when using the equality operator &#8220;==&#8221;. Since we can use the equality operator both primitive types as well as objects it may lead to confusion.<\/p>\n<p>Generally, the best practice is to use the equality operator with primitive types rather than objects. In the case of the object, we should use the equals method.<\/p>\n<h4>2. Mixing object and primitive type with equality and relational operator<\/h4>\n<p>The next thing that you should remember while using Autoboxing is that you should not mix the primitive types and Object with equality or relational operator.<\/p>\n<p>If you try to compare a primitive type with an object then there could be a NullPointerException if the object is null. For example:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">private static Integer number;\n\/\/NullPointerException on unboxing\nif( number &lt;= 0)\n{\n        System.out.println(\"Number is invalid\");\n}\n<\/pre>\n<h5>3. Cached Objects<\/h5>\n<p>Another risk while using Autoboxing and Unboxing is a cached object. The valueOf() method creates the boxed primitive type and it caches frequently used Object.<\/p>\n<h5>4. Unnecessary objects and GC overhead<\/h5>\n<p>The last problem with Autoboxing and unboxing is the expenses related to them. As the technique of autoboxing creates an unnecessary object, it can potentially slow down the speed of your program by frequent <em><strong>garbage collection.<\/strong><\/em><\/p>\n<h3>Conclusion<\/h3>\n<p>Autoboxing and unboxing in java are automatically done by the Java compiler. In this Java article, we learned Java autoboxing and unboxing. We discussed the advantages of Autoboxing in java and Unboxing in java.<\/p>\n<p>We also discussed some situations and examples where autoboxing and unboxing come into the picture.<\/p>\n<p>Thank you for reading our article. Do share your feedback through the comment section below.<\/p>\n<p>Happy Learning \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this java tutorial, we are going to learn autoboxing and unboxing in Java. We have briefly discussed this topic in our tutorial of Java wrapper classes. Java introduced the concept of Autoboxing and&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":78121,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[183],"tags":[1760,2320,2321,2005,2322],"class_list":["post-77643","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-autoboxing-in-java","tag-autoboxing-in-java-with-examples","tag-java-autoboxing","tag-java-autoboxing-and-unboxing","tag-java-unboxing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Autoboxing and Unboxing in Java- When and how to do it? - TechVidvan<\/title>\n<meta name=\"description\" content=\"Learn autoboxing and unboxing in Java to learn how to convert primitive data type into object of corresponding wrapper class &amp; vice versa.\" \/>\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\/autoboxing-and-unboxing-in-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Autoboxing and Unboxing in Java- When and how to do it? - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Learn autoboxing and unboxing in Java to learn how to convert primitive data type into object of corresponding wrapper class &amp; vice versa.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/autoboxing-and-unboxing-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-04-07T08:50:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/04\/important-points-for-autoboxing-unboxing-in-java.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=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Autoboxing and Unboxing in Java- When and how to do it? - TechVidvan","description":"Learn autoboxing and unboxing in Java to learn how to convert primitive data type into object of corresponding wrapper class & vice versa.","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\/autoboxing-and-unboxing-in-java\/","og_locale":"en_US","og_type":"article","og_title":"Autoboxing and Unboxing in Java- When and how to do it? - TechVidvan","og_description":"Learn autoboxing and unboxing in Java to learn how to convert primitive data type into object of corresponding wrapper class & vice versa.","og_url":"https:\/\/techvidvan.com\/tutorials\/autoboxing-and-unboxing-in-java\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2020-04-07T08:50:17+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/04\/important-points-for-autoboxing-unboxing-in-java.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":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/autoboxing-and-unboxing-in-java\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/autoboxing-and-unboxing-in-java\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Autoboxing and Unboxing in Java- When and how to do it?","datePublished":"2020-04-07T08:50:17+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/autoboxing-and-unboxing-in-java\/"},"wordCount":809,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/autoboxing-and-unboxing-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/04\/important-points-for-autoboxing-unboxing-in-java.jpg","keywords":["Autoboxing in Java","Autoboxing in java with examples","Java Autoboxing","Java Autoboxing and Unboxing","Java Unboxing"],"articleSection":["Java Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/autoboxing-and-unboxing-in-java\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/autoboxing-and-unboxing-in-java\/","url":"https:\/\/techvidvan.com\/tutorials\/autoboxing-and-unboxing-in-java\/","name":"Autoboxing and Unboxing in Java- When and how to do it? - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/autoboxing-and-unboxing-in-java\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/autoboxing-and-unboxing-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/04\/important-points-for-autoboxing-unboxing-in-java.jpg","datePublished":"2020-04-07T08:50:17+00:00","description":"Learn autoboxing and unboxing in Java to learn how to convert primitive data type into object of corresponding wrapper class & vice versa.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/autoboxing-and-unboxing-in-java\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/autoboxing-and-unboxing-in-java\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/autoboxing-and-unboxing-in-java\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/04\/important-points-for-autoboxing-unboxing-in-java.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/04\/important-points-for-autoboxing-unboxing-in-java.jpg","width":802,"height":420,"caption":"autoboxing-and-unboxing-in-java"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/autoboxing-and-unboxing-in-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Autoboxing and Unboxing in Java- When and how to do it?"}]},{"@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\/77643","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=77643"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/77643\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/78121"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=77643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=77643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=77643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}