{"id":50,"date":"2019-01-16T02:34:59","date_gmt":"2019-01-16T02:34:59","guid":{"rendered":"https:\/\/www.kindsonthegenius.com\/java\/?p=50"},"modified":"2019-03-02T04:35:40","modified_gmt":"2019-03-02T04:35:40","slug":"09-java-access-modifiers","status":"publish","type":"post","link":"https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/","title":{"rendered":"Java &#8211; Access Modifiers"},"content":{"rendered":"<p>We use access modifiers to set the access level for variables, methods, classes and constructors. We would examine the following:<\/p>\n<ol>\n<li><a href=\"#t1\">Default modifier (no keyword)<\/a><\/li>\n<li><a href=\"#t2\">Private Modifier (private keyword)<\/a><\/li>\n<li><a href=\"#t3\">Public Modifier (public keyword)<\/a><\/li>\n<li><a href=\"#t4\">Protected Modifier (protected keyword)<\/a><\/li>\n<li><a href=\"#t5\">About Inheritance<\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t1\">1. Default Modifier (No modifier keyword)<\/strong><\/h4>\n<p>Here you don&#8217;t specify and modifier keyword. As such, the following rule applies:<\/p>\n<p>Variable or Method declared without modifier is accessible to classes in the same package.<\/p>\n<p>Variables in an interface are public by default.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t2\">2. Private Access Modifier (private)<\/strong><\/h4>\n<p>Variables and methods declared are accessible\u00a0 online within the class. That is only by method in the same class. You specify private access modifier using the private keyword. This modifier provides the highest level of restriction.<\/p>\n<p>The only way to access private variables is to provide public getter and setter methods in the class.<\/p>\n<p>Private keyword cannot be applied to classes and interfaces.<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">public<\/span> <span style=\"color: #008800; font-weight: bold;\">class<\/span> <span style=\"color: #bb0066; font-weight: bold;\">Building<\/span> <span style=\"color: #333333;\">{<\/span>\r\n\r\n\t<span style=\"color: #008800; font-weight: bold;\">private<\/span> <span style=\"color: #333399; font-weight: bold;\">int<\/span> numberOfRooms<span style=\"color: #333333;\">;<\/span> <span style=\"color: #888888;\">\/\/private variable<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold;\">private<\/span> String address<span style=\"color: #333333;\">;<\/span>    <span style=\"color: #888888;\">\/\/private variable<\/span>\r\n\t\r\n\t<span style=\"color: #008800; font-weight: bold;\">public<\/span> <span style=\"color: #333399; font-weight: bold;\">int<\/span> <span style=\"color: #0066bb; font-weight: bold;\">getNumberOfRooms<\/span><span style=\"color: #333333;\">()<\/span> <span style=\"color: #333333;\">{<\/span> <span style=\"color: #888888;\">\/\/public getter<\/span>\r\n\t\t<span style=\"color: #008800; font-weight: bold;\">return<\/span> numberOfRooms<span style=\"color: #333333;\">;<\/span>\r\n\t<span style=\"color: #333333;\">}<\/span>\r\n\r\n\t<span style=\"color: #008800; font-weight: bold;\">public<\/span> String <span style=\"color: #0066bb; font-weight: bold;\">getAddress<\/span><span style=\"color: #333333;\">()<\/span> <span style=\"color: #333333;\">{<\/span>    <span style=\"color: #888888;\">\/\/public getter<\/span>\r\n\t\t<span style=\"color: #008800; font-weight: bold;\">return<\/span> address<span style=\"color: #333333;\">;<\/span>\r\n\t<span style=\"color: #333333;\">}<\/span>\r\n\r\n\t<span style=\"color: #555555; font-weight: bold;\">@Override<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold;\">public<\/span> String <span style=\"color: #0066bb; font-weight: bold;\">toString<\/span><span style=\"color: #333333;\">()<\/span> <span style=\"color: #333333;\">{<\/span>\r\n\t\t<span style=\"color: #008800; font-weight: bold;\">return<\/span> <span style=\"background-color: #fff0f0;\">\"Building [numberOfRooms=\"<\/span> <span style=\"color: #333333;\">+<\/span> numberOfRooms <span style=\"color: #333333;\">+<\/span> <span style=\"background-color: #fff0f0;\">\", address=\"<\/span> <span style=\"color: #333333;\">+<\/span> address <span style=\"color: #333333;\">+<\/span> <span style=\"background-color: #fff0f0;\">\"]\"<\/span><span style=\"color: #333333;\">;<\/span>\r\n\t<span style=\"color: #333333;\">}<\/span>\t\r\n<span style=\"color: #333333;\">}<\/span>\r\n<\/pre>\n<\/div>\n<p>Listing 1.0: Class with private variables and public getters<\/p>\n<p>&nbsp;<\/p>\n<p>The variables NumberOfRooms and Address are both private. But the getNumberOfRooms and getAddress methods are both public. We use this getters to make private variables available outside the class.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t3\">3. Public Access Modifier (public)<\/strong><\/h4>\n<p>Almost anything can be declared as public: classes, interfaces, methods, variables etc. As such, these can be accessible from outside the class.<\/p>\n<p>If however the class is in another package, then you need to import the package to use the class. Public methods and variables of a class are inherited by the subclass.<\/p>\n<p>An example of a public class\u00a0 is in Listing 1.0 above. The class Building is declared as public.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t4\">4.Protected Access Modifier (protected)<\/strong><\/h4>\n<p>Protected can be applied to variables, methods and constructors. However, you cannot declare a class or interface as protected. Protected variables or methods are accessible only by subclasses. This includes subclasses both within and outside the package.<\/p>\n<p>Moreover,\u00a0 methods and fields in an interface cannot be protected. This is because, classes that implements interface automatically have access to these methods\/variables. And the only way to use an interface is to implement it.<\/p>\n<p>An example is given in Listing 1.1<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">public<\/span> <span style=\"color: #008800; font-weight: bold;\">class<\/span> <span style=\"color: #bb0066; font-weight: bold;\">Shape<\/span> <span style=\"color: #333333;\">{<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold;\">protected<\/span> <span style=\"color: #333399; font-weight: bold;\">int<\/span> sides<span style=\"color: #333333;\">;<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold;\">protected<\/span> String typeOfShape<span style=\"color: #333333;\">;<\/span>\r\n\t\r\n\t<span style=\"color: #008800; font-weight: bold;\">protected<\/span> <span style=\"color: #333399; font-weight: bold;\">void<\/span> <span style=\"color: #0066bb; font-weight: bold;\">render<\/span><span style=\"color: #333333;\">()<\/span> <span style=\"color: #333333;\">{<\/span>\r\n\t\t\r\n\t<span style=\"color: #333333;\">}<\/span>\t\r\n<span style=\"color: #333333;\">}<\/span>\r\n<\/pre>\n<\/div>\n<p>Listing 1.1: Protected Access Modifier<\/p>\n<p>I recommend you run this code yourself. Also try to change the modifiers and see the result. The variables sides and typeOfShape are both protected.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t5\">5. About Inheritance<\/strong><\/h4>\n<p>When you create and inherited class, then the following rules apply:<\/p>\n<ul>\n<li>Private methods in superclass are not inherited by subclasses<\/li>\n<li>Protected methods in parent class must be public or protected in child class<\/li>\n<li>Public method in superclass must also be public in subclasses<\/li>\n<\/ul>\n<p>Finally, note that superclass is same as parent class. Similarly, subclass is same as child class.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We use access modifiers to set the access level for variables, methods, classes and constructors. We would examine the following: Default modifier (no keyword) Private &hellip; <\/p>\n","protected":false},"author":395,"featured_media":51,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-50","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Java - Access Modifiers - Java Tutorials<\/title>\n<meta name=\"description\" content=\"In this lesson, you will learn about the following access modiers in Java: Default, Private, Public and Protected access modifiers\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java - Access Modifiers - Java Tutorials\" \/>\n<meta property=\"og:description\" content=\"In this lesson, you will learn about the following access modiers in Java: Default, Private, Public and Protected access modifiers\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/\" \/>\n<meta property=\"og:site_name\" content=\"Java Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-16T02:34:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-03-02T04:35:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.kindsonthegenius.com\/java\/wp-content\/uploads\/sites\/9\/2019\/01\/Access-Modifiers-in-Java.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"950\" \/>\n\t<meta property=\"og:image:height\" content=\"518\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"kindsonthegenius\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"kindsonthegenius\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/09-java-access-modifiers\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/09-java-access-modifiers\\\/\"},\"author\":{\"name\":\"kindsonthegenius\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/#\\\/schema\\\/person\\\/63a68934672db675ff0cd80d066510c2\"},\"headline\":\"Java &#8211; Access Modifiers\",\"datePublished\":\"2019-01-16T02:34:59+00:00\",\"dateModified\":\"2019-03-02T04:35:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/09-java-access-modifiers\\\/\"},\"wordCount\":440,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/09-java-access-modifiers\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/wp-content\\\/uploads\\\/sites\\\/9\\\/2019\\\/01\\\/Access-Modifiers-in-Java.jpg\",\"articleSection\":[\"Java Tutorial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/09-java-access-modifiers\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/09-java-access-modifiers\\\/\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/09-java-access-modifiers\\\/\",\"name\":\"Java - Access Modifiers - Java Tutorials\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/09-java-access-modifiers\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/09-java-access-modifiers\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/wp-content\\\/uploads\\\/sites\\\/9\\\/2019\\\/01\\\/Access-Modifiers-in-Java.jpg\",\"datePublished\":\"2019-01-16T02:34:59+00:00\",\"dateModified\":\"2019-03-02T04:35:40+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/#\\\/schema\\\/person\\\/63a68934672db675ff0cd80d066510c2\"},\"description\":\"In this lesson, you will learn about the following access modiers in Java: Default, Private, Public and Protected access modifiers\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/09-java-access-modifiers\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/09-java-access-modifiers\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/09-java-access-modifiers\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/wp-content\\\/uploads\\\/sites\\\/9\\\/2019\\\/01\\\/Access-Modifiers-in-Java.jpg\",\"contentUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/wp-content\\\/uploads\\\/sites\\\/9\\\/2019\\\/01\\\/Access-Modifiers-in-Java.jpg\",\"width\":950,\"height\":518,\"caption\":\"Java Access Modifiers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/09-java-access-modifiers\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java &#8211; Access Modifiers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/#website\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/\",\"name\":\"Java Tutorials\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/#\\\/schema\\\/person\\\/63a68934672db675ff0cd80d066510c2\",\"name\":\"kindsonthegenius\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g\",\"caption\":\"kindsonthegenius\"},\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/author\\\/kindsonthegenius-2\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java - Access Modifiers - Java Tutorials","description":"In this lesson, you will learn about the following access modiers in Java: Default, Private, Public and Protected access modifiers","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:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/","og_locale":"en_US","og_type":"article","og_title":"Java - Access Modifiers - Java Tutorials","og_description":"In this lesson, you will learn about the following access modiers in Java: Default, Private, Public and Protected access modifiers","og_url":"https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/","og_site_name":"Java Tutorials","article_published_time":"2019-01-16T02:34:59+00:00","article_modified_time":"2019-03-02T04:35:40+00:00","og_image":[{"width":950,"height":518,"url":"https:\/\/www.kindsonthegenius.com\/java\/wp-content\/uploads\/sites\/9\/2019\/01\/Access-Modifiers-in-Java.jpg","type":"image\/jpeg"}],"author":"kindsonthegenius","twitter_card":"summary_large_image","twitter_misc":{"Written by":"kindsonthegenius","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/#article","isPartOf":{"@id":"https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/"},"author":{"name":"kindsonthegenius","@id":"https:\/\/www.kindsonthegenius.com\/java\/#\/schema\/person\/63a68934672db675ff0cd80d066510c2"},"headline":"Java &#8211; Access Modifiers","datePublished":"2019-01-16T02:34:59+00:00","dateModified":"2019-03-02T04:35:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/"},"wordCount":440,"commentCount":0,"image":{"@id":"https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kindsonthegenius.com\/java\/wp-content\/uploads\/sites\/9\/2019\/01\/Access-Modifiers-in-Java.jpg","articleSection":["Java Tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/","url":"https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/","name":"Java - Access Modifiers - Java Tutorials","isPartOf":{"@id":"https:\/\/www.kindsonthegenius.com\/java\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/#primaryimage"},"image":{"@id":"https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kindsonthegenius.com\/java\/wp-content\/uploads\/sites\/9\/2019\/01\/Access-Modifiers-in-Java.jpg","datePublished":"2019-01-16T02:34:59+00:00","dateModified":"2019-03-02T04:35:40+00:00","author":{"@id":"https:\/\/www.kindsonthegenius.com\/java\/#\/schema\/person\/63a68934672db675ff0cd80d066510c2"},"description":"In this lesson, you will learn about the following access modiers in Java: Default, Private, Public and Protected access modifiers","breadcrumb":{"@id":"https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/#primaryimage","url":"https:\/\/www.kindsonthegenius.com\/java\/wp-content\/uploads\/sites\/9\/2019\/01\/Access-Modifiers-in-Java.jpg","contentUrl":"https:\/\/www.kindsonthegenius.com\/java\/wp-content\/uploads\/sites\/9\/2019\/01\/Access-Modifiers-in-Java.jpg","width":950,"height":518,"caption":"Java Access Modifiers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.kindsonthegenius.com\/java\/09-java-access-modifiers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.kindsonthegenius.com\/java\/"},{"@type":"ListItem","position":2,"name":"Java &#8211; Access Modifiers"}]},{"@type":"WebSite","@id":"https:\/\/www.kindsonthegenius.com\/java\/#website","url":"https:\/\/www.kindsonthegenius.com\/java\/","name":"Java Tutorials","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.kindsonthegenius.com\/java\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.kindsonthegenius.com\/java\/#\/schema\/person\/63a68934672db675ff0cd80d066510c2","name":"kindsonthegenius","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g","caption":"kindsonthegenius"},"url":"https:\/\/www.kindsonthegenius.com\/java\/author\/kindsonthegenius-2\/"}]}},"_links":{"self":[{"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/posts\/50","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/users\/395"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/comments?post=50"}],"version-history":[{"count":1,"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/posts\/50\/revisions"}],"predecessor-version":[{"id":52,"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/posts\/50\/revisions\/52"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/media\/51"}],"wp:attachment":[{"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/media?parent=50"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/categories?post=50"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/tags?post=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}