

{"id":16017,"date":"2018-05-18T04:04:59","date_gmt":"2018-05-18T04:04:59","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=16017"},"modified":"2026-05-30T15:16:40","modified_gmt":"2026-05-30T09:46:40","slug":"java-semaphore","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/java-semaphore\/","title":{"rendered":"Java Semaphore &#8211; Working &amp; Constructor Use in Semaphore Class"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:1944,&quot;href&quot;:&quot;https:\\\/\\\/docs.oracle.com\\\/javase\\\/7\\\/docs\\\/api\\\/java\\\/util\\\/concurrent\\\/Semaphore.html&quot;,&quot;archived_href&quot;:&quot;&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[],&quot;broken&quot;:false,&quot;last_checked&quot;:null,&quot;process&quot;:&quot;new&quot;}]'><\/div>\n<p>In our previous tutorial, we saw\u00a0<a href=\"https:\/\/data-flair.training\/blogs\/java-synchronized\/\"><strong>Java Synchronized Method<\/strong><\/a>. Here, we will study the what is Java Semaphore. Along with the definition,\u00a0we will discuss the working of semaphore in Java. In addition, we will learn constructors in Semaphore class and how to use Java Semaphores as locks. At last, we cover the Java Semaphore Example.<\/p>\n<p>So, let&#8217;s start Java Semaphore Tutorial.<\/p>\n<div id=\"attachment_16029\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/2018-05-15-1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-16029\" class=\"wp-image-16029 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/2018-05-15-1.jpg\" alt=\"Java Semaphore - Working &amp; Constructor\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/2018-05-15-1.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/2018-05-15-1-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/2018-05-15-1-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/2018-05-15-1-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/2018-05-15-1-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-16029\" class=\"wp-caption-text\">Semaphore in Java &#8211; Working &amp; Constructor Use in Semaphore Class<\/p><\/div>\n<h3>What is Java Semaphore?<\/h3>\n<p>Java semaphore controls access to a mutual asset or resource using a counter. On the off chance that the counter is more noteworthy than zero, at that point get is permitted. In the event that it is zero, at that point get access is denied. What the counter is tallying are licenses that enable access to the mutual asset. Along these lines, to get to the resource, a <a href=\"https:\/\/data-flair.training\/blogs\/java-string-methods-and-constructor\/\"><strong>string<\/strong> <\/a>must be conceded allow from the semaphore.<\/p>\n<ul>\n<li>Limited access to shared resources ensures that resources cannot be used in harmful manner<\/li>\n<li>Granted permission is needed for resources when thread tries to use the resources. For granting the permission it has an acquire() method.<\/li>\n<li>Tracking the processing of thread after the operations are performed gives the close signal.<\/li>\n<li>Restricting an external entity to achieve the integrity of the object.<\/li>\n<\/ul>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/literals-in-java\/\">Let&#8217;s study\u00a0Literals in Java \u2013 Integral, Floating, Char, Boolean<\/a><\/strong><\/p>\n<h3>Working of Java Semaphore<\/h3>\n<p>By and large, to utilize a Java semaphore, the string that needs access to the mutual asset tries to procure a permit<\/p>\n<ul>\n<li>In the event that the semaphore&#8217;s count is more than zero, at that point, the string obtains a permit, which makes the Java semaphore check be decremented.<\/li>\n<li>Something else, the string will be obstructed until the point when a permit can be gained.<\/li>\n<li>When no permit is needed any longer it releases a permit and thus makes the semaphore&#8217;s check be increased.<\/li>\n<li>If there is another thread that is different from the previous one, then it will acquire a permit then.<\/li>\n<\/ul>\n<p>Java gives Semaphore class in java.util.concurrent package that actualizes this system. So, you don&#8217;t need to execute your own particular semaphore in Java.<\/p>\n<div id=\"attachment_16028\" style=\"width: 643px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/d2.jpeg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-16028\" class=\"wp-image-16028 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/d2.jpeg\" alt=\"Working of Java Semaphore\" width=\"633\" height=\"819\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/d2.jpeg 633w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/d2-116x150.jpeg 116w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/d2-232x300.jpeg 232w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/a><p id=\"caption-attachment-16028\" class=\"wp-caption-text\">Working of Semaphors in Java<\/p><\/div>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/singleton-class-in-java\/\">Read about Singleton Class in Java Programming Langauge<\/a><\/strong><\/p>\n<h3>Constructors in Java Semaphore Class<\/h3>\n<p>There are two<a href=\"https:\/\/data-flair.training\/blogs\/constructor-in-java\/\"><strong> constructors<\/strong> <\/a>in Semaphore class in Java.<\/p>\n<ul>\n<li>Java Semaphore (int num)<\/li>\n<li>Java Semaphore (int num, boolean how)<\/li>\n<\/ul>\n<p>Here, num determines the permit count initially. Along these lines, it determines the number of strings that can get to a common resource at any one time. On the off chance that it is one, at that point just a single string can get to the resource at any one time. As a matter of course, all holding up strings allow permit in an indistinct request. By setting how to true, you can guarantee that holding up strings conceded permit in the request in which they asked forgetting to.<\/p>\n<h3>Using Java Semaphores as Locks (preventing race condition)<\/h3>\n<p>We can utilize semaphores to lock access to a resource, each string that needs to utilize that asset should first call obtain( ) before getting to the asset to gain the bolt. At the point when the string is finished with the asset, it must call discharge( ) to discharge bolt.<\/p>\n<h4>Java Semaphore Example<\/h4>\n<p>Let&#8217;s see the Semaphore example, to understand it better:<\/p>\n<pre class=\"EnlighterJSRAW\">import java.util.concurrent.*;\r\nclass Shared\r\n{\r\nstatic int count = 0;\r\n}\r\nclass MyThread extends Thread\r\n{\r\nSemaphore sem;\r\nString threadName;\r\npublic MyThread(Semaphore sem, String threadName)\r\n{\r\nsuper(threadName);\r\nthis.sem = sem;\r\nthis.threadName = threadName;\r\n}\r\n@Override\r\npublic void run() {\r\nif(this.getName().equals(\"A\"))\r\n{\r\nSystem.out.println(\"Starting \" + threadName);\r\ntry\r\n{\r\nSystem.out.println(threadName + \" is waiting for a permit.\");\r\nsem.acquire();\r\nSystem.out.println(threadName + \" gets a permit.\");\r\nfor(int i=0; i &lt; 5; i++)\r\n{\r\nShared.count++;\r\nSystem.out.println(threadName + \": \" + Shared.count);\r\nThread.sleep(10);\r\n}\r\n} catch (InterruptedException exc) {\r\nSystem.out.println(exc);\r\n}\r\nSystem.out.println(threadName + \" releases the permit.\");\r\nsem.release();\r\n}\r\nelse\r\n{\r\nSystem.out.println(\"Starting \" + threadName);\r\ntry\r\n{\r\nSystem.out.println(threadName + \" is waiting for a permit.\");\r\nsem.acquire();\r\nSystem.out.println(threadName + \" gets a permit.\");\r\nfor(int i=0; i &lt; 5; i++)\r\n{\r\nShared.count--;\r\nSystem.out.println(threadName + \": \" + Shared.count);\r\nThread.sleep(10);\r\n}\r\n} catch (InterruptedException exc) {\r\nSystem.out.println(exc);\r\n}\r\nSystem.out.println(threadName + \" releases the permit.\");\r\nsem.release();\r\n}\r\n}\r\n}\r\npublic class SemaphoreDemo\r\n{\r\npublic static void main(String args[]) throws InterruptedException\r\n{\r\nSemaphore sem = new Semaphore(1);\r\nMyThread mt1 = new MyThread(sem, \"A\");\r\nMyThread mt2 = new MyThread(sem, \"B\");\r\nmt1.start();\r\nmt2.start();\r\nmt1.join();\r\nmt2.join();\r\nSystem.out.println(\"count: \" + Shared.count);\r\n}\r\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\nStarting A<br \/>\nStarting B<br \/>\nB is waiting for a permit.<br \/>\nB gets a permit.<br \/>\nA is waiting for a permit.<br \/>\nB: -1<br \/>\nB: -2<br \/>\nB: -3<br \/>\nB: -4<br \/>\nB: -5<br \/>\nB releases the permit.<br \/>\nA gets a permit.<br \/>\nA: -4<br \/>\nA: -3<br \/>\nA: -2<br \/>\nA: -1<br \/>\nA: 0<br \/>\nA releases the permit.<br \/>\ncount: 0<\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/java-extends-vs-implements\/\">Let&#8217;s explore Java Extends vs Implements With Example Program<\/a><\/strong><\/p>\n<p>So, this was all\u00a0about Java Semaphore Tutorial. Hope you like our explanation<b><\/b>.<\/p>\n<h3>Conclusion<\/h3>\n<p>Hence, we learned about Java Semaphore and its working. In addition, we discussed constructor in semaphore class and how to use Semaphores in Java as locks.\u00a0Furthermore, if you have any query, feel free to ask in the comment section.<\/p>\n<p style=\"font-weight: 400\">Related Topic &#8211;\u00a0<strong><a href=\"https:\/\/data-flair.training\/blogs\/java-wildcard\/\">Types of Wildcard in Java<\/a><\/strong><\/p>\n<p style=\"font-weight: 400\"><strong><a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/concurrent\/Semaphore.html\">For reference\u00a0<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our previous tutorial, we saw\u00a0Java Synchronized Method. Here, we will study the what is Java Semaphore. Along with the definition,\u00a0we will discuss the working of semaphore in Java. In addition, we will learn&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":16029,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[2931,5904,6365,7676,7677,12717],"class_list":["post-16017","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-constructor-in-semaphore-class","tag-how-java-semaphore-works","tag-how-to-use-java-semaphores-as-lock","tag-java-semaphore-example","tag-java-semaphore-tutorial","tag-semaphore-in-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Java Semaphore - Working &amp; Constructor Use in Semaphore Class - DataFlair<\/title>\n<meta name=\"description\" content=\"Java Semaphore Tutorial- What is Semaphore in Java with example,How Java semaphore Works, constructor in semaphore class.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/java-semaphore\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java Semaphore - Working &amp; Constructor Use in Semaphore Class - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Java Semaphore Tutorial- What is Semaphore in Java with example,How Java semaphore Works, constructor in semaphore class.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/java-semaphore\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-05-18T04:04:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-30T09:46:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/2018-05-15-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java Semaphore - Working &amp; Constructor Use in Semaphore Class - DataFlair","description":"Java Semaphore Tutorial- What is Semaphore in Java with example,How Java semaphore Works, constructor in semaphore class.","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:\/\/data-flair.training\/blogs\/java-semaphore\/","og_locale":"en_US","og_type":"article","og_title":"Java Semaphore - Working &amp; Constructor Use in Semaphore Class - DataFlair","og_description":"Java Semaphore Tutorial- What is Semaphore in Java with example,How Java semaphore Works, constructor in semaphore class.","og_url":"https:\/\/data-flair.training\/blogs\/java-semaphore\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-05-18T04:04:59+00:00","article_modified_time":"2026-05-30T09:46:40+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/2018-05-15-1.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/java-semaphore\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/java-semaphore\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Java Semaphore &#8211; Working &amp; Constructor Use in Semaphore Class","datePublished":"2018-05-18T04:04:59+00:00","dateModified":"2026-05-30T09:46:40+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/java-semaphore\/"},"wordCount":707,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/java-semaphore\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/2018-05-15-1.jpg","keywords":["constructor in semaphore class","How Java semaphore Works","how to use Java Semaphores as Lock","Java Semaphore Example","Java Semaphore Tutorial","Semaphore in Java"],"articleSection":["Java Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/java-semaphore\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/java-semaphore\/","url":"https:\/\/data-flair.training\/blogs\/java-semaphore\/","name":"Java Semaphore - Working &amp; Constructor Use in Semaphore Class - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/java-semaphore\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/java-semaphore\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/2018-05-15-1.jpg","datePublished":"2018-05-18T04:04:59+00:00","dateModified":"2026-05-30T09:46:40+00:00","description":"Java Semaphore Tutorial- What is Semaphore in Java with example,How Java semaphore Works, constructor in semaphore class.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/java-semaphore\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/java-semaphore\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/java-semaphore\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/2018-05-15-1.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/2018-05-15-1.jpg","width":1200,"height":628,"caption":"Java Semaphore - Working &amp; Constructor"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/java-semaphore\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Java Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/java\/"},{"@type":"ListItem","position":3,"name":"Java Semaphore &#8211; Working &amp; Constructor Use in Semaphore Class"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/16017","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=16017"}],"version-history":[{"count":6,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/16017\/revisions"}],"predecessor-version":[{"id":148505,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/16017\/revisions\/148505"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/16029"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=16017"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=16017"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=16017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}