

{"id":7179,"date":"2018-02-03T19:49:18","date_gmt":"2018-02-03T19:49:18","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=7179"},"modified":"2026-05-18T17:26:07","modified_gmt":"2026-05-18T11:56:07","slug":"java-inner-class","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/java-inner-class\/","title":{"rendered":"4 Types of Java Inner Class &#8211; You Must Know!"},"content":{"rendered":"<p>Earlier we learned about classes and objects. These are an integral part of programming in Java. However, it is very important to know that classes, just like loops, are nested, i.e one class definition inside another class. The following article will teach you about Java inner class and how to use nested classes effectively.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Java-Inner-Class-df.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-84333\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Java-Inner-Class-df.jpg\" alt=\"Java Inner Class\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Java-Inner-Class-df.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Java-Inner-Class-df-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Java-Inner-Class-df-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Java-Inner-Class-df-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Java-Inner-Class-df-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Java-Inner-Class-df-720x377.jpg 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Java-Inner-Class-df-520x272.jpg 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Java-Inner-Class-df-320x167.jpg 320w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><\/p>\n<h3>Inner Classes in Java<\/h3>\n<p>Inner classes in Java are the classes that are defined inside the scope of another class. Inner classes are also called nested classes. This helps in easy documentation and better maintenance of the code.<\/p>\n<h3>Need for Java Inner Classes<\/h3>\n<p>Sometimes you will need to program a class in such a way that no other class can access it. Hence, it would be better if you enclose it within other classes.<\/p>\n<p>If all the class objects are a part of the outer object, then it is easier to nest that class inside the outer class. That way, all the outer classes can access all the objects of the inner class.<\/p>\n<p><strong>Syntax of inner class in Java:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">public class OuterCLass {\r\n  \/\/outer code\r\n  public class innerClass {\r\n    \/\/Inner class code\r\n  }\r\n}<\/pre>\n<p><strong>There are 4 types of inner classes in Java:<\/strong><\/p>\n<p>1. Nested Inner class<br \/>\n2. Method local inner classes<br \/>\n3. Anonymous inner classes<br \/>\n4. Static nested classes<\/p>\n<h4>Nested inner class in Java<\/h4>\n<p>As the name suggests, this type of inner class involves the nesting of a class inside another class. The inner class can access the private variables of the outer class.<\/p>\n<p>We can modify access to the inner class by using access modifier keywords such as private, protected, and default. Similarly, access specifiers can help nest interfaces inside one another.<\/p>\n<p><strong>Java program to illustrate the usage of a nested inner class:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.dataflair.innerclass;\r\nclass OuterClass {\r\n  public class InnerClass {\r\n    public void print() {\r\n      System.out.println(\"I am printing from the inner class!\");\r\n\r\n    }\r\n  }\r\n}\r\n\r\npublic class NestedInnerClass {\r\n  public static void main(String[] args) {\r\n    OuterClass.InnerClass in =new OuterClass().new InnerClass(); in .print();\r\n  }\r\n\r\n}<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">I am printing from the inner class!<\/div>\n<p>One thing to remember is that even though we can have nested static classes, we cannot have methods that are static inside the nested classes. Because all the methods of the nested class are implicitly connected to the object of its outer enclosing class. Hence, they cannot declare any static methods for themselves.<\/p>\n<p><strong>Java program to illustrate the static method in the nested class:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.dataflair.innerclass;\r\nclass OuterClass {\r\n  public class InnerClass {\r\n    static public void print() {\r\n      System.out.println(\"I am printing from inner class!\");\r\n\r\n    }\r\n  }\r\n}\r\n\r\npublic class StaticInnerClassMethod {\r\n  public static void main(String[] args) {\r\n    OuterClass.InnerClass in =new OuterClass().new InnerClass(); in .print();\r\n  }\r\n\r\n}<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">StaticInnerClassMethod.java:5: error: Illegal static declaration in inner class OuterClass.InnerClass<br \/>\nstatic public void print()<br \/>\n^<br \/>\nModifier &#8216;static&#8217; is only allowed in constant variable declarations<br \/>\n1 error<\/div>\n<p><strong>a. Static nested classes in java<\/strong><\/p>\n<p>If you declare the inner class to be static, then you can access the class without having to create an object of the outer class. However, the static class will not have access to members of the outer class. We can access the elements of the outer class from the inner class.<\/p>\n<p><strong>Java program to illustrate the use of static nested classes:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.dataflair.innerclass;\r\nclass OuterClass {\r\n  public static class InnerClass {\r\n    public void print() {\r\n      System.out.println(\"I am printing from a static inner class!\");\r\n\r\n    }\r\n  }\r\n}\r\n\r\npublic class StaticInnerClass {\r\n  public static void main(String[] args) {\r\n    OuterClass.InnerClass in =new OuterClass.InnerClass(); in .print();\r\n  }\r\n\r\n}<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">I am printing from a static inner class!<\/div>\n<h4>2. Method Local Inner Classes in Java<\/h4>\n<p>Up until now, we have seen classes coded inside other classes. In the case of method local inner classes, the outer class method contains the inner class.<\/p>\n<p>These classes are defined in the method of the outer class. A class defined under the method can access all the variables of the outer class as well as the method and the members of other methods, too, irrespective of the access modifier.<\/p>\n<p>However, the inner class cannot use the variables of the outer class if they are not declared as final values. This rule was prevalent until JDK 1.7. After that, inner classes can access non-final local variables.<\/p>\n<p><strong>Java program to illustrate the use of Method Local Inner Classes:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.dataflair.innerclass;\r\nclass OuterClass {\r\n  void outerClassMethod() {\r\n    final String site = \"Data-Flair.training\";\r\n    System.out.println(\"Hey I am inside outerClassMethod\");\r\n    class InnerClass {\r\n      void innerClassMethod() {\r\n        System.out.println(\"I am studying Java at \" + site);\r\n      }\r\n    }\r\n    InnerClass in =new InnerClass(); in .innerClassMethod();\r\n  }\r\n}\r\n\r\npublic class MainClass {\r\n  public static void main(String[] args) {\r\n    OuterClass out = new OuterClass();\r\n    out.outerClassMethod();\r\n  }\r\n\r\n}<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">Hey I am inside outerClassMethod<br \/>\nI am studying Java at Data-Flair.training<\/div>\n<p><strong><em>Note: <\/em><\/strong><strong><em>If you are using JDK 1.7 or below, removing the final keyword will give you an error like this:<\/em><\/strong><\/p>\n<p>The code inside the inner class is trying to access the local variable named site. The error will be rectified if you declare the variable as final.<\/p>\n<h4>3. Anonymous Inner Classes in Java<\/h4>\n<p>As the name suggests, these inner classes have no name at all. The definition of the classes is written outside the scope of the outer class. These classes are useful when we have to design an interface or overload a method. It saves us the effort of having to nest the class.<\/p>\n<p>These classes are used when we need to define extended characteristics of the class or interfaces without creating another class or interface.<\/p>\n<p><strong>They are of two types.<\/strong><\/p>\n<p><strong>1.<\/strong> Subclass of the specified type.<br \/>\n<strong>2.<\/strong> The implementer of the specified interface.<\/p>\n<h5>1. Subclass of the specified type<\/h5>\n<p>In this method, the anonymous class is put inside a subclass of the outer class. The subclass serves the function as illustrated below.<\/p>\n<p><strong>Java program to illustrate the use of a subclass of a specified type:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">class OuterClass {\r\n  void print() {\r\n    System.out.println(\"I am in the print method of superclass\");\r\n  }\r\n}\r\nclass AnonymousClass {\r\n\r\n  \/\/  An anonymous class with OuterClass as base class \r\n  \/\/start of the anonymous class.\r\n  static OuterClass out = new OuterClass() {\r\n    void print() {\r\n      super.print();\r\n      System.out.println(\"I am in Anonymous class\");\r\n    }\r\n  };\r\n  public static void main(String[] args) {\r\n    out.print();\r\n  }\r\n}<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">I am in the print method of the superclass<br \/>\nI am in Anonymous class<\/div>\n<h5>2. The implementer of the specified Interface<\/h5>\n<p>The anonymous class can extend a class or implement an interface at a time. We learned about extending a class using anonymous classes in the previous example.<\/p>\n<p>Here in this example, we will see interface implementation by anonymous classes. Anonymous classes can also implement interfaces, as shown below.<\/p>\n<p><strong>Java program to illustrate the use of anonymous classes to implement interfaces:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.dataflar.innerclass;\r\ninterface Anonym {\r\n  void print();\r\n}\r\nclass AnonymousClass {\r\n\r\n  \/\/  An anonymous class with OuterClass as base class \r\n  \/\/start of the anonymous class.\r\n  static Anonym an = new Anonym() {\r\n    public void print() {\r\n      System.out.println(\"I am an implementation of interface Anonym\");\r\n    }\r\n  };\r\n  public static void main(String[] args) {\r\n    an.print();\r\n  }\r\n}<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">I am an implementation of interface Anonym<\/div>\n<h3>Where Inner Classes Shine<\/h3>\n<p>Inner classes offer a variety of use cases that enhance code organization, modularity, and readability. Here are some common scenarios where inner classes prove beneficial:<\/p>\n<p><strong>1. Helper Classes:<\/strong> Inner classes can encapsulate helper methods specific to the outer class, promoting better code organization and reducing clutter within the main class definition.<\/p>\n<p><strong>2. Event Listeners:<\/strong> When designing graphical user interfaces (GUIs) in Java, inner classes are frequently used to implement event listeners. These listeners can be tailored to handle specific events within the outer class.<\/p>\n<p><strong>3. Anonymous Classes for Callbacks:<\/strong> Anonymous inner classes excel at defining callback methods without the need for creating separate named classes. This is particularly useful for concise implementation of functionalities like button clicks or data retrieval callbacks.<\/p>\n<h3>Best Practices for Inner Classes<\/h3>\n<p>While inner classes offer numerous advantages, it&#8217;s essential to employ them judiciously to maintain code quality. Here are some best practices to keep in mind:<\/p>\n<p><strong>1. Favor Meaningful Names:<\/strong> Unless anonymous classes are strictly necessary, strive to assign descriptive names to your inner classes. This enhances code readability and comprehension for both you and other developers.<\/p>\n<p><strong>2. Minimize Inner Class Scope:<\/strong> Limit the scope of inner classes whenever possible. This helps prevent unnecessary access to outer class members and promotes better encapsulation.<\/p>\n<p><strong>3. Consider Alternatives:<\/strong> Inner classes shouldn&#8217;t be the default choice for every situation. If a class doesn&#8217;t have a strong dependency on the outer class, consider making it a separate top-level class for improved reusability.<\/p>\n<h3>Summary<\/h3>\n<p>We learned about the different types of inner classes and their functions in programming. Inner classes are effective while designing interfaces and classes with intricate definitions. It also helps in organizing similar classes together.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Earlier we learned about classes and objects. These are an integral part of programming in Java. However, it is very important to know that classes, just like loops, are nested, i.e one class definition&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":84333,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[6723,6724,7544,9037,13779,13780,15072],"class_list":["post-7179","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-inner-class-in-java","tag-inner-classes-in-java","tag-java-inner-class","tag-nested-inner-class-in-java","tag-static-inner-class","tag-static-inner-class-in-java","tag-types-of-java-inner-class"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>4 Types of Java Inner Class - You Must Know! - DataFlair<\/title>\n<meta name=\"description\" content=\"Java inner class is a class declared in another class. Learn and implement Nested, Method local, Anonymous, Static inner Class with Example\" \/>\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-inner-class\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"4 Types of Java Inner Class - You Must Know! - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Java inner class is a class declared in another class. Learn and implement Nested, Method local, Anonymous, Static inner Class with Example\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/java-inner-class\/\" \/>\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-02-03T19:49:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-18T11:56:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Java-Inner-Class-df.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=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"4 Types of Java Inner Class - You Must Know! - DataFlair","description":"Java inner class is a class declared in another class. Learn and implement Nested, Method local, Anonymous, Static inner Class with Example","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-inner-class\/","og_locale":"en_US","og_type":"article","og_title":"4 Types of Java Inner Class - You Must Know! - DataFlair","og_description":"Java inner class is a class declared in another class. Learn and implement Nested, Method local, Anonymous, Static inner Class with Example","og_url":"https:\/\/data-flair.training\/blogs\/java-inner-class\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-02-03T19:49:18+00:00","article_modified_time":"2026-05-18T11:56:07+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Java-Inner-Class-df.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":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/java-inner-class\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/java-inner-class\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"4 Types of Java Inner Class &#8211; You Must Know!","datePublished":"2018-02-03T19:49:18+00:00","dateModified":"2026-05-18T11:56:07+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/java-inner-class\/"},"wordCount":1139,"commentCount":1,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/java-inner-class\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Java-Inner-Class-df.jpg","keywords":["inner class in java","inner classes in Java","Java inner class","Nested Inner Class in Java","Static inner class","static inner class in Java","types of Java inner class"],"articleSection":["Java Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/java-inner-class\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/java-inner-class\/","url":"https:\/\/data-flair.training\/blogs\/java-inner-class\/","name":"4 Types of Java Inner Class - You Must Know! - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/java-inner-class\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/java-inner-class\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Java-Inner-Class-df.jpg","datePublished":"2018-02-03T19:49:18+00:00","dateModified":"2026-05-18T11:56:07+00:00","description":"Java inner class is a class declared in another class. Learn and implement Nested, Method local, Anonymous, Static inner Class with Example","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/java-inner-class\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/java-inner-class\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/java-inner-class\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Java-Inner-Class-df.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Java-Inner-Class-df.jpg","width":1200,"height":628,"caption":"Java Inner Class"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/java-inner-class\/#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":"4 Types of Java Inner Class &#8211; You Must Know!"}]},{"@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\/7179","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=7179"}],"version-history":[{"count":19,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/7179\/revisions"}],"predecessor-version":[{"id":148368,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/7179\/revisions\/148368"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/84333"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=7179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=7179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=7179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}