{"id":2199,"date":"2024-02-25T02:24:21","date_gmt":"2024-02-25T02:24:21","guid":{"rendered":"https:\/\/datmt.com\/?p=2199"},"modified":"2024-02-25T02:24:22","modified_gmt":"2024-02-25T02:24:22","slug":"understanding-and-equals-in-java","status":"publish","type":"post","link":"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/","title":{"rendered":"Understanding == and equals() in Java"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p>In Java, the\u00a0<code>==<\/code>\u00a0operator and the\u00a0<code>equals()<\/code>\u00a0method are both used to compare objects, but they serve different purposes and operate in fundamentally different ways.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Stack, Heap, and References<\/h2>\n\n\n\n<p>Before delving into the differences between == and equals, first, you need to understand what are references and how they are stored and used in Java. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">References and the Heap<\/h3>\n\n\n\n<p>In Java, objects are stored in the heap memory. The heap is a runtime data area from which memory for all class instances and arrays is allocated. It is created at the JVM start-up. <\/p>\n\n\n\n<p>Heap memory for objects is reclaimed by an automatic memory management system known as garbage collection, which frees memory that is no longer reachable by any references. <\/p>\n\n\n\n<p>When a new object is created, for example,\u00a0<code>Object a = new Object()<\/code>, the actual object is placed in the heap, and the variable\u00a0<code>a<\/code>\u00a0stores a reference to it. This reference is essentially the memory address where the object is stored in the heap. However, the variable\u00a0<code>a<\/code>\u00a0itself is stored in the stack memory.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Stack Memory and References<\/h3>\n\n\n\n<p>Stack memory is used for execution threads and stores primitive variables and references to objects in the heap space. Each thread in a Java application has its own stack that is created when the thread is created. The stack contains frames that hold local variables and references to other objects in the heap. <\/p>\n\n\n\n<p>When a method is called, a new frame is pushed onto the stack for that method&#8217;s local variables and references. When the method completes, the frame is popped off the stack. The references stored in the stack memory point to objects in the heap. These references are critical for accessing and manipulating the objects. For instance, when you pass an object to a method, what is passed is the reference to the object. This allows methods to operate on the same object instances stored in the heap.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The == Operator<\/h2>\n\n\n\n<p>The\u00a0<code>==<\/code>\u00a0operator is used for reference comparison, which means it checks if two object references point to the same memory location. When you use\u00a0<code>==<\/code>\u00a0with object references, it will return\u00a0<code>true<\/code>\u00a0if both references are pointing to the same object instance in the heap, otherwise, it will return\u00a0<code>false<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-java&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Java&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;java&quot;}\">String s1 = &quot;HELLO&quot;;\nString s2 = &quot;HELLO&quot;;\nString s3 = new String(&quot;HELLO&quot;);\n\nSystem.out.println(s1 == s2); \/\/ true, because s1 and s2 refer to the same instance in the string constant pool\nSystem.out.println(s1 == s3); \/\/ false, because s3 is created in the heap as a new instance<\/pre><\/div>\n\n\n\n<p>In the above example,\u00a0<code>s1<\/code>\u00a0and\u00a0<code>s2<\/code>\u00a0point to the same string literal in the string constant pool, hence\u00a0<code>s1 == s2<\/code>\u00a0evaluates to\u00a0<code>true<\/code>. However,\u00a0<code>s3<\/code>\u00a0is created with the\u00a0<code>new<\/code>\u00a0keyword, which forces the creation of a new string object in the heap, so\u00a0<code>s1 == s3<\/code>\u00a0evaluates to\u00a0<code>false<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The equals() Method<\/h2>\n\n\n\n<p>The\u00a0<code>equals()<\/code>\u00a0method, on the other hand, is intended for content comparison. It checks if two objects are &#8220;equal&#8221; in terms of their state (the data they hold), not their reference. The behavior of the\u00a0<code>equals()<\/code>\u00a0method is not defined by the language itself but by the specific implementation within the classes. <\/p>\n\n\n\n<p>By default, the\u00a0<code>equals()<\/code>\u00a0method in the\u00a0<code>Object<\/code>\u00a0class compares the references, just like the\u00a0<code>==<\/code>\u00a0operator. However, many classes override the\u00a0<code>equals()<\/code>\u00a0method to provide a more meaningful comparison based on the content of the objects.For example, the\u00a0<code>String<\/code>\u00a0class overrides the\u00a0<code>equals()<\/code>\u00a0method to compare the sequence of characters within the two string objects:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-java&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Java&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;java&quot;}\">String s1 = new String(&quot;HELLO&quot;);\nString s2 = new String(&quot;HELLO&quot;);\n\nSystem.out.println(s1.equals(s2)); \/\/ true, because the content of both strings is the same<\/pre><\/div>\n\n\n\n<p>Even though\u00a0<code>s1<\/code>\u00a0and\u00a0<code>s2<\/code>\u00a0refer to different objects,\u00a0<code>s1.equals(s2)<\/code>\u00a0returns\u00a0<code>true<\/code>\u00a0because the content of both strings is identical.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Key Differences<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>==<\/code>&nbsp;checks for reference equality (whether two references point to the same object).<\/li>\n\n\n\n<li><code>equals()<\/code>&nbsp;checks for content equality (whether two objects are logically &#8220;equal&#8221; based on their content).<\/li>\n\n\n\n<li><code>==<\/code>&nbsp;is an operator, while&nbsp;<code>equals()<\/code>&nbsp;is a method that can be overridden.<\/li>\n\n\n\n<li>By default,\u00a0<code>equals()<\/code>\u00a0behaves like\u00a0<code>==<\/code>\u00a0in the\u00a0<code>Object<\/code>\u00a0class, but it is often overridden in subclasses to provide content-based equality checks.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>In summary, use\u00a0<code>==<\/code>\u00a0when you want to check if two references are to the same object and use\u00a0<code>equals()<\/code>\u00a0when you want to check if two objects are equivalent in terms of their data. Always remember that the behavior of\u00a0<code>equals()<\/code>\u00a0can vary depending on how it&#8217;s implemented in the class of the objects you&#8217;re comparing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview In Java, the\u00a0==\u00a0operator and the\u00a0equals()\u00a0method are both used to compare objects, but they serve different purposes and operate in fundamentally different ways. Stack, Heap, and References Before delving into the differences between == and equals, first, you need to understand what are references and how they are stored and used in Java. References and &#8230; <a title=\"Understanding == and equals() in Java\" class=\"read-more\" href=\"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/\" aria-label=\"Read more about Understanding == and equals() in Java\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":2201,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[4],"tags":[305,101,73],"class_list":["post-2199","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-core","tag-java","tag-java-core"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Understanding == and equals() in Java - datmt<\/title>\n<meta name=\"description\" content=\"In Java, the\u00a0==\u00a0operator and the\u00a0equals()\u00a0method are both used to compare objects, but they serve different purposes and operate in fundamentally different ways.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Understanding == and equals() in Java - datmt\" \/>\n<meta property=\"og:description\" content=\"In Java, the\u00a0==\u00a0operator and the\u00a0equals()\u00a0method are both used to compare objects, but they serve different purposes and operate in fundamentally different ways.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/\" \/>\n<meta property=\"og:site_name\" content=\"datmt\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-25T02:24:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-25T02:24:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/10\/datmt-java-thumbnail.jpg-bc-at-2199.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u0110\u1ea1t Tr\u1ea7n\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u0110\u1ea1t Tr\u1ea7n\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/\"},\"author\":{\"name\":\"\u0110\u1ea1t Tr\u1ea7n\",\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e\"},\"headline\":\"Understanding == and equals() in Java\",\"datePublished\":\"2024-02-25T02:24:21+00:00\",\"dateModified\":\"2024-02-25T02:24:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/\"},\"wordCount\":647,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e\"},\"image\":{\"@id\":\"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/10\/datmt-java-thumbnail.jpg-bc-at-2199.jpg\",\"keywords\":[\"core\",\"java\",\"java core\"],\"articleSection\":[\"java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/\",\"url\":\"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/\",\"name\":\"Understanding == and equals() in Java - datmt\",\"isPartOf\":{\"@id\":\"https:\/\/datmt.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/10\/datmt-java-thumbnail.jpg-bc-at-2199.jpg\",\"datePublished\":\"2024-02-25T02:24:21+00:00\",\"dateModified\":\"2024-02-25T02:24:22+00:00\",\"description\":\"In Java, the\u00a0==\u00a0operator and the\u00a0equals()\u00a0method are both used to compare objects, but they serve different purposes and operate in fundamentally different ways.\",\"breadcrumb\":{\"@id\":\"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/#primaryimage\",\"url\":\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/10\/datmt-java-thumbnail.jpg-bc-at-2199.jpg\",\"contentUrl\":\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/10\/datmt-java-thumbnail.jpg-bc-at-2199.jpg\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/datmt.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Understanding == and equals() in Java\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/datmt.com\/#website\",\"url\":\"https:\/\/datmt.com\/\",\"name\":\"datmt\",\"description\":\"Hands on projects\",\"publisher\":{\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/datmt.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e\",\"name\":\"\u0110\u1ea1t Tr\u1ea7n\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/03\/cropped-profile.jpg\",\"contentUrl\":\"https:\/\/datmt.com\/wp-content\/uploads\/2023\/03\/cropped-profile.jpg\",\"width\":512,\"height\":512,\"caption\":\"\u0110\u1ea1t Tr\u1ea7n\"},\"logo\":{\"@id\":\"https:\/\/datmt.com\/#\/schema\/person\/image\/\"},\"description\":\"I build softwares that solve problems. I also love writing\/documenting things I learn\/want to learn.\",\"sameAs\":[\"https:\/\/datmt.com\"],\"url\":\"https:\/\/datmt.com\/author\/mtdat171_c\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Understanding == and equals() in Java - datmt","description":"In Java, the\u00a0==\u00a0operator and the\u00a0equals()\u00a0method are both used to compare objects, but they serve different purposes and operate in fundamentally different ways.","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:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/","og_locale":"en_US","og_type":"article","og_title":"Understanding == and equals() in Java - datmt","og_description":"In Java, the\u00a0==\u00a0operator and the\u00a0equals()\u00a0method are both used to compare objects, but they serve different purposes and operate in fundamentally different ways.","og_url":"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/","og_site_name":"datmt","article_published_time":"2024-02-25T02:24:21+00:00","article_modified_time":"2024-02-25T02:24:22+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/datmt.com\/wp-content\/uploads\/2023\/10\/datmt-java-thumbnail.jpg-bc-at-2199.jpg","type":"image\/jpeg"}],"author":"\u0110\u1ea1t Tr\u1ea7n","twitter_card":"summary_large_image","twitter_misc":{"Written by":"\u0110\u1ea1t Tr\u1ea7n","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/#article","isPartOf":{"@id":"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/"},"author":{"name":"\u0110\u1ea1t Tr\u1ea7n","@id":"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e"},"headline":"Understanding == and equals() in Java","datePublished":"2024-02-25T02:24:21+00:00","dateModified":"2024-02-25T02:24:22+00:00","mainEntityOfPage":{"@id":"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/"},"wordCount":647,"commentCount":0,"publisher":{"@id":"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e"},"image":{"@id":"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/datmt.com\/wp-content\/uploads\/2023\/10\/datmt-java-thumbnail.jpg-bc-at-2199.jpg","keywords":["core","java","java core"],"articleSection":["java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/","url":"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/","name":"Understanding == and equals() in Java - datmt","isPartOf":{"@id":"https:\/\/datmt.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/#primaryimage"},"image":{"@id":"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/datmt.com\/wp-content\/uploads\/2023\/10\/datmt-java-thumbnail.jpg-bc-at-2199.jpg","datePublished":"2024-02-25T02:24:21+00:00","dateModified":"2024-02-25T02:24:22+00:00","description":"In Java, the\u00a0==\u00a0operator and the\u00a0equals()\u00a0method are both used to compare objects, but they serve different purposes and operate in fundamentally different ways.","breadcrumb":{"@id":"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/#primaryimage","url":"https:\/\/datmt.com\/wp-content\/uploads\/2023\/10\/datmt-java-thumbnail.jpg-bc-at-2199.jpg","contentUrl":"https:\/\/datmt.com\/wp-content\/uploads\/2023\/10\/datmt-java-thumbnail.jpg-bc-at-2199.jpg","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/datmt.com\/backend\/java\/understanding-and-equals-in-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/datmt.com\/"},{"@type":"ListItem","position":2,"name":"Understanding == and equals() in Java"}]},{"@type":"WebSite","@id":"https:\/\/datmt.com\/#website","url":"https:\/\/datmt.com\/","name":"datmt","description":"Hands on projects","publisher":{"@id":"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/datmt.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/datmt.com\/#\/schema\/person\/7736566e3758f424a11fd53f581c4b5e","name":"\u0110\u1ea1t Tr\u1ea7n","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/datmt.com\/#\/schema\/person\/image\/","url":"https:\/\/datmt.com\/wp-content\/uploads\/2023\/03\/cropped-profile.jpg","contentUrl":"https:\/\/datmt.com\/wp-content\/uploads\/2023\/03\/cropped-profile.jpg","width":512,"height":512,"caption":"\u0110\u1ea1t Tr\u1ea7n"},"logo":{"@id":"https:\/\/datmt.com\/#\/schema\/person\/image\/"},"description":"I build softwares that solve problems. I also love writing\/documenting things I learn\/want to learn.","sameAs":["https:\/\/datmt.com"],"url":"https:\/\/datmt.com\/author\/mtdat171_c\/"}]}},"_links":{"self":[{"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/posts\/2199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/comments?post=2199"}],"version-history":[{"count":1,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/posts\/2199\/revisions"}],"predecessor-version":[{"id":2200,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/posts\/2199\/revisions\/2200"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/media\/2201"}],"wp:attachment":[{"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/media?parent=2199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/categories?post=2199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/datmt.com\/wp-json\/wp\/v2\/tags?post=2199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}