{"id":88549,"date":"2024-01-11T18:00:52","date_gmt":"2024-01-11T12:30:52","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=88549"},"modified":"2024-01-11T18:00:52","modified_gmt":"2024-01-11T12:30:52","slug":"life-cycle-of-a-thread-in-java","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/life-cycle-of-a-thread-in-java\/","title":{"rendered":"Life Cycle of a Thread in Java"},"content":{"rendered":"<p>In this article, we shall take an in-depth look at the detailed phases of a thread&#8217;s life cycle and examine how threads develop, interact or contribute to its dynamic programming environment. We&#8217;ll explore each state&#8217;s details, highlighting the importance of good thread management and synchronization from the moment a thread is born to its end or termination.<\/p>\n<h2>Different Thread States in Java<\/h2>\n<h3>New:<\/h3>\n<p>The &#8220;New&#8221; state is the initial phase in the life cycle of a thread within a multithreaded environment. The thread is created, but it hasn&#8217;t started to execute its assigned code at the time of this state. The &#8220;new&#8221; state is the beginning of the thread as it emerges from instantiation and serves as the starting point for the thread&#8217;s journey through its various stages. Every time a new thread is created, it is always in a new state.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">class MyThread extends Thread{\n    public void run(){}\n}\npublic class Main {\n    public static void main(String[] args){\n        MyThread t = new MyThread();\n        System. out.println(\"TechVidvan-Thread was in a new state\");\n    }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>TechVidvan-<\/strong>Thread is in a new state<\/p>\n<h3>Runnable:<\/h3>\n<p><strong>Threads enter the &#8220;Runnable&#8221; state in several ways:<\/strong><\/p>\n<p>I. After being created and started using the start() method.<\/p>\n<p>II. After being in the &#8220;Blocked&#8221; or &#8220;Waiting&#8221; state and becoming ready to execute again.<\/p>\n<p>III. When an operating system thread scheduler allocates processing time to the thread.<\/p>\n<p>It&#8217;s important to note that being in the &#8220;Runnable&#8221; state does not guarantee immediate execution. The actual execution depends on the scheduler&#8217;s decisions, which are influenced by factors like thread priorities and fairness.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">class MyThread extends Thread{\n    public void run(){}\n}\npublic class Main {\n    public static void main(String[] args){\n        MyThread t = new MyThread();\n        t.start();\n        \/\/getState() is used to get the state of the Thread\n        System.out.println(\"TechVidvan-Thread state:\"+Thread.currentThread().getState());\n    }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>TechVidvan-<\/strong>Thread state: RUNNABLE<\/p>\n<h3>Running:<\/h3>\n<p>Threads enter the &#8220;Running&#8221; state from the &#8220;Runnable&#8221; state when they are selected by the thread scheduler for execution. The scheduler allocates CPU time to threads based on priorities, thread states, and the scheduling algorithm used. Threads may also transition to the &#8220;Running&#8221; state from the &#8220;Blocked&#8221; or &#8220;Waiting&#8221; states when the conditions they were waiting for are satisfied.<\/p>\n<p>While threads are in the &#8220;Running&#8221; state, they actively contribute to the progress of the program, performing computations, processing data, and executing instructions. Effective synchronization and coordination mechanisms are important during this phase to manage shared resources and ensure proper communication between threads<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">class MyThread extends Thread{\n    public void run(){\n        for(int i=1;i&lt;4;i++){\n            System.out.println(\"TechVidvan-Thread is in Running state\");\n            String s=\"TechVidvan-Thread: \"+i;\n            System.out.println(s);\n        }\n    }\n}\npublic class Main {\n    public static void main(String[] args){\n        MyThread t = new MyThread();\n        t.start();\n    }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>TechVidvan-<\/strong>Thread is in a Running state<br \/>\n<strong>TechVidvan-Thread :<\/strong> 1<\/p>\n<p><strong>TechVidvan-<\/strong>Thread is in a Running state<br \/>\n<strong>TechVidvan-Thread :<\/strong> 2<\/p>\n<p><strong>TechVidvan-<\/strong>Thread is in a Running state<br \/>\n<strong>TechVidvan-Thread :<\/strong> 3<\/p>\n<h3>Blocked:<\/h3>\n<p>Threads enter the &#8220;Blocked&#8221; state when they need access to a resource that is currently unavailable or when they are waiting for a certain event to occur. This state helps manage thread interactions and resource sharing, preventing multiple threads from accessing or modifying shared resources simultaneously and potentially leading to data inconsistencies or conflicts.<\/p>\n<p><strong>Common scenarios that lead to the &#8220;Blocked&#8221; state include:<\/strong><\/p>\n<p><strong>I. Waiting for a Lock:<\/strong> When a thread attempts to acquire a lock on a synchronized block or method that is already held by another thread, it enters the &#8220;Blocked&#8221; state. The thread will remain blocked until the lock becomes available.<\/p>\n<p><strong>II. I \/O Operations:<\/strong> While waiting for an I\/O action to finish, threads doing I\/O activities, such as reading from or writing to a file or network socket, may enter the &#8220;Blocked&#8221; state.<\/p>\n<p><strong>III. Waiting for a Condition:<\/strong> Threads waiting for a certain condition to be met, often signalled by another thread, can enter the &#8220;Blocked&#8221; state until the condition is satisfied.<\/p>\n<p><strong>IV. Explicit Blocking:<\/strong> Threads can be explicitly blocked by calling methods like Thread.sleep() or Object.wait(). These methods suspend the thread&#8217;s execution for a specified time or until another thread notifies them.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">class MyThread extends Thread{\n    int i=1;\n    public void run(){\n        while(i&lt;6){\n            System.out.println(\"TechVidvan-Thread \"+i);\n            \/\/try-catch block to handle exceptions that may be raised when a thread enters a blocked state\n            try{\n                System.out.println(\"TechVidvan-Thread enters Blocked state\");\n                Thread.sleep(2000);\n            }\n            catch (InterruptedException e){\n                System.out.println(\"InterruptedException has been raised\");\n            }\n            i++;\n        }\n    }\n}\npublic class Main {\n    public static void main(String[] args){\n        MyThread t = new MyThread();\n        t.start();\n    }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>TechVidvan-<\/strong>Thread 1<br \/>\n<strong>TechVidvan-<\/strong>Thread enters a Blocked state<\/p>\n<p><strong>TechVidvan<\/strong>-Thread 2<br \/>\n<strong>TechVidvan-<\/strong>Thread enters a Blocked state<\/p>\n<p><strong>TechVidvan-<\/strong>Thread 3<br \/>\n<strong>TechVidvan-<\/strong>Thread enters a Blocked state<\/p>\n<p><strong>TechVidvan-<\/strong>Thread 4<br \/>\n<strong>TechVidvan-<\/strong>Thread enters a Blocked state<\/p>\n<p><strong>TechVidvan-<\/strong>Thread 5<br \/>\n<strong>TechVidvan-<\/strong>Thread enters a Blocked state<\/p>\n<h3>Waiting:<\/h3>\n<p>In contrast to the &#8220;Blocked&#8221; state, where a thread is prevented from executing due to external factors, threads in the &#8220;Waiting&#8221; state choose to wait for a specific event or signal. This event is typically triggered by another thread, indicating that a certain condition has been satisfied or an action has been completed.<\/p>\n<p><strong>Common scenarios that lead to the &#8220;Waiting&#8221; state include:<\/strong><\/p>\n<p><strong>I. Object Waiting:<\/strong> Threads can enter the &#8220;Waiting&#8221; state by invoking the Object.wait() method, which temporarily suspends their execution until another thread calls Object.notify() or Object.notifyAll() on the same object.<\/p>\n<p><strong>II. Thread Joining:<\/strong> When a thread calls the join() method on another thread, it enters the &#8220;Waiting&#8221; state until the joined thread completes its execution.<\/p>\n<p><strong>III. Timed Waiting:<\/strong> Threads can enter a timed &#8220;Waiting&#8221; state by invoking methods like Thread.sleep() or Object.wait(timeout), where they wait for a specified period before resuming execution.<\/p>\n<p><strong>IV. Waiting for I\/O:<\/strong> Threads performing I\/O operations, such as reading from or writing to a file or network socket, can enter the &#8220;Waiting&#8221; state while waiting for the I\/O operation to complete.<\/p>\n<p>Once the awaited condition is met or the specified period elapses, the thread transitions back to the &#8220;Runnable&#8221; state, becoming eligible for execution again. The decision to transition from &#8220;Waiting&#8221; to &#8220;Runnable&#8221; is typically triggered by explicit signals, timeouts, or the actions of other threads.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">public class Main {\n    public static void main(String[] args) throws InterruptedException{\n        MyThread t = new MyThread();\n        t.start();\/\/starting the thread\n        t.join(2000);\/\/calling the join()\n        for(int i=0;i&lt;3;i++){\n            System.out.println(\"TechVidvan-Main Thread\");\n        }\n    }\n}\nclass MyThread extends Thread{\n    public void run(){\n        for(int i=0;i&lt;3;i++){\n            System.out.println(\"TechVidvan-Thread1\");\n        }\n     }\n  }<\/pre>\n<p><strong> Output:<\/strong><\/p>\n<p><strong>TechVidvan-<\/strong>Thread1<\/p>\n<p><strong>TechVidvan-<\/strong>Thread1<\/p>\n<p><strong>TechVidvan-<\/strong>Thread1<\/p>\n<p><strong>TechVidvan-<\/strong>Main Thread<\/p>\n<p><strong>TechVidvan-<\/strong>Main Thread<\/p>\n<p><strong>TechVidvan-<\/strong>Main Thread<\/p>\n<h3>Terminated:<\/h3>\n<p>In the &#8220;Terminated&#8221; state, a thread has finished executing its designated code and has fulfilled its purpose within the multithreaded application. It is no longer eligible for execution, and its resources, such as memory and system handles, can be released and reclaimed by the operating system.<\/p>\n<p><strong>Threads can reach the &#8220;Terminated&#8221; state in several ways:<\/strong><\/p>\n<p><strong>I. Successful Completion:<\/strong> When a thread completes the execution of its run() method or its designated task, it naturally transitions to the &#8220;Terminated&#8221; state.<\/p>\n<p><strong>II. Uncaught Exception:<\/strong> If an unhandled exception occurs within a thread and propagates to the top of its call stack, the thread terminates abruptly and enters the &#8220;Terminated&#8221; state.<\/p>\n<p><strong>III. Thread Termination:<\/strong> Threads can be explicitly terminated by calling the Thread. stop() method. However, this method is considered unsafe and deprecated, as it can leave resources in an inconsistent state.<\/p>\n<p>IV. Once a thread is in the &#8220;Terminated&#8221; state, it cannot return to any other state in the thread life cycle. However, the termination of one thread does not impact the execution of other threads in the application, which can continue running and contribute to the program&#8217;s concurrent processing.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">class MyThread extends Thread {\n    public void run() {\n        for (int i = 1; i &lt; 4; i++) {\n            System.out.println(\"TechVidvan-Thread \" + i);\n        }\n    }\n}\npublic class Main {\n    public static void main(String[] args) throws InterruptedException {\n        MyThread t = new MyThread();\n        t.start();\n        \/\/ Wait for the thread to complete\n        t.join();\n        \/\/ Now the thread has completed its execution\n        System.out.println(\"when Techvidvan-Thread execution completed: \" + t.getState());\n    }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>TechVidvan-<\/strong>Thread 1<\/p>\n<p><strong>TechVidvan-<\/strong>Thread 2<\/p>\n<p><strong>TechVidvan-<\/strong>Thread 3<\/p>\n<p><strong>When Techvidvan-<\/strong>Thread execution is completed: TERMINATED<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/01\/life-cycle-of-a-thread.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-90332 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/01\/life-cycle-of-a-thread.webp\" alt=\"life cycle of a thread\" width=\"500\" height=\"466\" \/><\/a><\/p>\n<h3>Conclusion<\/h3>\n<p>In the end, the thread life cycle is a fundamental part of multithreaded programming, which offers synchronized sequences of states where threads are gracefully moving through them.<\/p>\n<p>The &#8220;New&#8221; state in the thread life cycle marks the inception of a thread, representing the moment when a thread is created and allocated memory.<\/p>\n<p>The &#8220;Runnable&#8221; state is a dynamic phase where threads are poised for execution, eagerly awaiting their turn to actively contribute to the concurrent processing power of a multithreaded application.<\/p>\n<p>In the &#8220;Running&#8221; state, threads are actively executing their instructions on the CPU.<\/p>\n<p>The &#8220;Blocked&#8221; state is a vital component of the thread life cycle, allowing threads to pause temporarily while waiting for specific conditions to be met.<\/p>\n<p>The &#8220;Waiting&#8221; state represents a deliberate pause in a thread&#8217;s execution as it waits for a specific event or condition.<\/p>\n<p>The &#8220;Terminated&#8221; state marks the conclusion of a thread&#8217;s journey within a multithreaded application.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we shall take an in-depth look at the detailed phases of a thread&#8217;s life cycle and examine how threads develop, interact or contribute to its dynamic programming environment. We&#8217;ll explore each&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":89059,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[183],"tags":[296,5315,327,5316,5317,5318],"class_list":["post-88549","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-java","tag-java-life-cycle-of-a-thread","tag-java-tutorials","tag-life-cycle-of-a-thread","tag-life-cycle-of-thread-in-java","tag-thread-life-cycle"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Life Cycle of a Thread in Java - TechVidvan<\/title>\n<meta name=\"description\" content=\"The thread life cycle is a fundamental part of multithreaded programming, which offers synchronized sequences of states.\" \/>\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\/life-cycle-of-a-thread-in-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Life Cycle of a Thread in Java - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"The thread life cycle is a fundamental part of multithreaded programming, which offers synchronized sequences of states.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/life-cycle-of-a-thread-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=\"2024-01-11T12:30:52+00:00\" \/>\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":"Life Cycle of a Thread in Java - TechVidvan","description":"The thread life cycle is a fundamental part of multithreaded programming, which offers synchronized sequences of states.","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\/life-cycle-of-a-thread-in-java\/","og_locale":"en_US","og_type":"article","og_title":"Life Cycle of a Thread in Java - TechVidvan","og_description":"The thread life cycle is a fundamental part of multithreaded programming, which offers synchronized sequences of states.","og_url":"https:\/\/techvidvan.com\/tutorials\/life-cycle-of-a-thread-in-java\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2024-01-11T12:30:52+00:00","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\/life-cycle-of-a-thread-in-java\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/life-cycle-of-a-thread-in-java\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Life Cycle of a Thread in Java","datePublished":"2024-01-11T12:30:52+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/life-cycle-of-a-thread-in-java\/"},"wordCount":1211,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/life-cycle-of-a-thread-in-java\/#primaryimage"},"thumbnailUrl":"","keywords":["java","java life cycle of a thread","java tutorials","life cycle of a thread","life cycle of thread in java","thread life cycle"],"articleSection":["Java Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/life-cycle-of-a-thread-in-java\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/life-cycle-of-a-thread-in-java\/","url":"https:\/\/techvidvan.com\/tutorials\/life-cycle-of-a-thread-in-java\/","name":"Life Cycle of a Thread in Java - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/life-cycle-of-a-thread-in-java\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/life-cycle-of-a-thread-in-java\/#primaryimage"},"thumbnailUrl":"","datePublished":"2024-01-11T12:30:52+00:00","description":"The thread life cycle is a fundamental part of multithreaded programming, which offers synchronized sequences of states.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/life-cycle-of-a-thread-in-java\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/life-cycle-of-a-thread-in-java\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/life-cycle-of-a-thread-in-java\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/life-cycle-of-a-thread-in-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Life Cycle of a Thread 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\/88549","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=88549"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/88549\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=88549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=88549"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=88549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}