{"id":91447,"date":"2023-08-14T15:43:05","date_gmt":"2023-08-14T10:13:05","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/"},"modified":"2025-06-27T10:12:51","modified_gmt":"2025-06-27T04:42:51","slug":"interface-in-java","status":"publish","type":"post","link":"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/","title":{"rendered":"Java Interfaces: A Complete Guide for Beginners"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"what-is-java-interface\">What is Java Interface?<\/h2>\n\n\n\n<p>A Java interface is a blueprint or guide for a class. It lists methods that a class must have, but it does not say how those methods should work. It also defines unchanging values. Classes then <b>implement<\/b> these interfaces, which means they promise to follow the rules set by the interface.<\/p>\n\n\n\n<p>You use the word <code>interface<\/code> to tell Java you are making an interface. An interface mostly tells you what a class should do, rather than how the class will do it.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npublic interface Printable {\n    void print(); \/\/ This is a method that classes must implement\n    int PAGE_LIMIT = 100; \/\/ This is a constant value\n}\n<\/pre><\/div>\n\n\n<p>This example interface, <code>Printable<\/code>, makes sure that any class using it will have a method named <code>print()<\/code>. It also gives a constant value, <code>PAGE_LIMIT<\/code>, which is set to 100.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"why-interfaces-are-important\">Why Interfaces are Important?<\/h2>\n\n\n\n<p>Interfaces offer many good things that help you build strong and adaptable Java applications. They are very useful for designing your programs.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>Make Code Abstract:<\/b> Interfaces hide the small details of how something works. You only see what methods are available. This makes your code simpler to use because you do not need to know the inner workings.<\/li>\n\n\n\n<li><b>Allow Multiple Behaviors:<\/b> Java does not let a class inherit from more than one class. However, interfaces let a single class act like it has many different kinds of behaviors. This is a very powerful way to design your programs.<\/li>\n\n\n\n<li><b>Help with Loose Connections:<\/b> Interfaces make parts of your code connect loosely. This means that classes depend on the rules defined by interfaces, not on specific ways things are built. This makes your code much more flexible and easier to change later.<\/li>\n\n\n\n<li><b>Set Rules for APIs:<\/b> Interfaces create clear rules for how different parts of a program or different programs will talk to each other, like a contract. Developers then know exactly what methods they can expect to use. This helps many people work together on the same project more easily.<\/li>\n<\/ul>\n\n\n\n    <div class=\"courses-cta-container\">\n        <div class=\"courses-cta-card\">\n            <div class=\"courses-cta-header\">\n                <div class=\"courses-learn-icon\"><\/div>\n                <span class=\"courses-learn-text\">Academy Pro<\/span>\n            <\/div>\n            <p class=\"courses-cta-title\">\n                <a href=\"https:\/\/www.mygreatlearning.com\/academy\/premium\/master-java-programming\" class=\"courses-cta-title-link\">Java Programming Course<\/a>\n            <\/p>\n            <p class=\"courses-cta-description\">Learn Java the right way! Our course teaches you essential programming skills, from coding basics to complex projects, setting you up for success in the tech industry.<\/p>\n            <div class=\"courses-cta-stats\">\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-user-icon\"><\/div>\n                    <span>16.05 Hrs<\/span>\n                <\/div>\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-star-icon\"><\/div>\n                    <span>3 Projects<\/span>\n                <\/div>\n            <\/div>\n            <a href=\"https:\/\/www.mygreatlearning.com\/academy\/premium\/master-java-programming\" class=\"courses-cta-button\">\n                Learn Java Programming\n                <div class=\"courses-arrow-icon\"><\/div>\n            <\/a>\n        <\/div>\n    <\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-make-an-interface\">How to Make an Interface<\/h2>\n\n\n\n<p>Making an interface is quite simple. You just use the word <code>interface<\/code> before its name.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npublic interface MyInterface {\n    void doSomething(); \/\/ This method must be public and abstract\n    String getData();   \/\/ This method must also be public and abstract\n}\n<\/pre><\/div>\n\n\n<p>All methods you put in an interface are automatically <b>public<\/b> and <b>abstract<\/b>. This means anyone can use them, and they do not have a body or code inside them. Also, any variables you put in an interface are automatically <b>public<\/b>, <b>static<\/b>, and <b>final<\/b>.<\/p>\n\n\n\n<p>This means they are constant values that belong to the interface itself, not to an object of the interface. You do not need to add these keywords yourself; Java adds them for you.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-use-an-interface-in-a-class\">How to Use an Interface in a Class<\/h2>\n\n\n\n<p>A class uses an interface by adding the word <code>implements<\/code> followed by the interface's name. The class then must write the code for all the methods that the interface said it should have.<\/p>\n\n\n\n<p>Here is an example of how a <code>Document<\/code> class uses the <code>Printable<\/code> interface:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npublic class Document implements Printable {\n    @Override\n    public void print() { \/\/ This method provides the actual code for print()\n        System.out.println(&quot;Printing document...&quot;);\n    }\n}\n<\/pre><\/div>\n\n\n<p>You must include the <code>@Override<\/code> tag and write the code for the <code>print()<\/code> method inside the <code>Document<\/code> class. If you do not provide code for all the methods from the interface, the Java compiler will show an error.<\/p>\n\n\n\n<p>A single class can use more than one interface. You just list them with commas in between their names.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npublic class Report implements Printable, Exportable {\n    \/\/ This class must write code for methods from both Printable and Exportable interfaces.\n    @Override\n    public void print() {\n        System.out.println(&quot;Printing report...&quot;);\n    }\n\n    @Override\n    public void export() {\n        System.out.println(&quot;Exporting report...&quot;);\n    }\n}\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"abstract-classes-versus-interfaces\">Abstract Classes Versus Interfaces<\/h2>\n\n\n\n<p>People sometimes get <a href=\"https:\/\/www.mygreatlearning.com\/blog\/abstract-class-vs-interface-in-java\/\">abstract classes and interfaces<\/a> mixed up. However, they are used for different things.<\/p>\n\n\n\n<p>Here is a table that shows the main differences between them:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>&nbsp;<\/th><th>Abstract Class<\/th><th>Interface<\/th><\/tr><\/thead><tbody><tr><td><b>What It Is<\/b><\/td><td>A class that cannot be directly created as an object and can contain abstract methods (methods without a body).<\/td><td>A blueprint for a class that contains only abstract methods (before Java 8) and constant variables.<\/td><\/tr><tr><td><b><a href=\"https:\/\/www.mygreatlearning.com\/blog\/methods-in-java\/\">Methods<\/a><\/b><\/td><td>Can have methods with code and methods without code.<\/td><td>Can only have methods without code (before Java 8). After Java 8, can also have methods with default code, static methods, and private methods.<\/td><\/tr><tr><td><b>Variables<\/b><\/td><td>Can have variables that belong to an object and variables that belong to the class.<\/td><td>Can only have unchanging values that are public, static, and final.<\/td><\/tr><tr><td><b><a href=\"https:\/\/www.mygreatlearning.com\/blog\/constructor-in-java\/\">Constructors<\/a><\/b><\/td><td>Can have special methods to create objects (constructors).<\/td><td>Cannot have special methods to create objects (constructors).<\/td><\/tr><tr><td><b><a href=\"https:\/\/www.mygreatlearning.com\/blog\/inheritance-in-java\/\">Inheritance<\/a><\/b><\/td><td>A class can only extend one abstract class.<\/td><td>A class can implement many interfaces.<\/td><\/tr><tr><td><b>Main Goal<\/b><\/td><td>Gives a common base for classes that are related to each other.<\/td><td>Defines a set of actions or behaviors that classes must follow.<\/td><\/tr><tr><td><b><a href=\"https:\/\/www.mygreatlearning.com\/blog\/the-access-modifiers-in-java\/\">Access Types<\/a><\/b><\/td><td>Methods and variables can have different access levels, like public, private, protected.<\/td><td>Methods are always public.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"newer-features-for-interfaces-java-8-and-later\">Newer Features for Interfaces (Java 8 and Later)<\/h2>\n\n\n\n<p>Java versions 8 and newer added new features to interfaces. These changes make interfaces more powerful for developers. They help you reuse code and write less repeated code.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"default-methods\">Default Methods<\/h3>\n\n\n\n<p><b>Default methods<\/b> provide some ready-made code inside the interface itself. Classes that use this interface can use these methods as they are, or they can write their own version of these methods. This is very helpful when you want to add a new method to an interface without forcing all existing classes that use it to change their code.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npublic interface Logger {\n    void log(String message); \/\/ An abstract method that must be implemented\n\n    default void logInfo(String message) { \/\/ This is a default method with code\n        log(&quot;INFO: &quot; + message); \/\/ It uses the abstract log method\n    }\n\n    default void logError(String message) { \/\/ Another default method\n        log(&quot;ERROR: &quot; + message);\n    }\n}\n\npublic class ConsoleLogger implements Logger {\n    @Override\n    public void log(String message) {\n        System.out.println(message); \/\/ This class implements the abstract log method\n    }\n}\n\n\/\/ How to use it:\nConsoleLogger logger = new ConsoleLogger();\nlogger.logInfo(&quot;User logged in.&quot;); \/\/ This uses the default implementation from the interface\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"static-methods\">Static Methods<\/h3>\n\n\n\n<p>Interfaces can also have <b><a href=\"https:\/\/www.mygreatlearning.com\/blog\/static-method-in-java\/\">static methods<\/a><\/b>. You call static methods directly on the interface itself, not on an object of a class that implements the interface. These methods are useful for common helper tasks that are related to the interface's purpose.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npublic interface MathUtils {\n    static int add(int a, int b) { \/\/ A static method in the interface\n        return a + b;\n    }\n\n    static int subtract(int a, int b) { \/\/ Another static method\n        return a - b;\n    }\n}\n\n\/\/ How to call it directly:\nint sum = MathUtils.add(5, 3);\nSystem.out.println(&quot;Sum: &quot; + sum); \/\/ This will print: Sum: 8\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"private-methods-java-9-and-later\">Private Methods (Java 9 and later)<\/h3>\n\n\n\n<p>Starting with Java 9, you can add <b>private methods<\/b> to interfaces. These methods are helper methods that only other methods within the same interface (like default or static methods) can use. They help you organize your code better inside the interface by letting you put common helper logic in one place.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npublic interface Validator {\n    private boolean isValidString(String s) { \/\/ This is a private helper method\n        return s != null &amp;amp;&amp;amp; !s.trim().isEmpty(); \/\/ Checks if a string is not null and not empty\n    }\n\n    default void validateName(String name) { \/\/ A default method that uses the private helper\n        if (!isValidString(name)) {\n            throw new IllegalArgumentException(&quot;Name cannot be empty.&quot;);\n        }\n        System.out.println(&quot;Name is valid: &quot; + name);\n    }\n\n    default void validateEmail(String email) { \/\/ Another default method\n        if (!isValidString(email) || !email.contains(&quot;@&quot;)) {\n            throw new IllegalArgumentException(&quot;Invalid email format.&quot;);\n        }\n        System.out.println(&quot;Email is valid: &quot; + email);\n    }\n}\n\n\/\/ How to use it:\n\/\/ We create an anonymous implementation for demonstration purposes.\nValidator myValidator = new Validator() {};\nmyValidator.validateName(&quot;John Doe&quot;); \/\/ This will print: Name is valid: John Doe\n\/\/ If you uncomment the line below, it will throw an error:\n\/\/ myValidator.validateName(&quot;&quot;);\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"good-ways-to-use-interfaces\">Good Ways to Use Interfaces<\/h2>\n\n\n\n<p>Follow these tips to use interfaces in the best way possible.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>Make Interfaces Small:<\/b> Design each interface to do one specific job. Avoid making very large interfaces that try to do too many things. Smaller interfaces are easier to understand and use.<\/li>\n\n\n\n<li><b>Give Interfaces Clear Names:<\/b> Choose names that clearly describe what the interface does. Often, names that end with \"-able\" (like <code>Printable<\/code>) or \"-er\" (like <code>Logger<\/code>) are good choices.<\/li>\n\n\n\n<li><b>Use Interfaces for Callbacks:<\/b> Interfaces are excellent for setting up \"callbacks.\" This is when one part of your code needs another part to do something specific without knowing exactly what that other part is. This helps keep your code loosely connected.<\/li>\n\n\n\n<li><b>Choose Composition Over Inheritance:<\/b> Often, it is better to use interfaces with composition (where one object contains another object) instead of only using inheritance (where one class gets properties from another). This makes your code more flexible and easier to reuse in different situations.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"real-world-examples\">Real-World Examples<\/h2>\n\n\n\n<p>You can find interfaces in many parts of Java's built-in libraries and other frameworks.<\/p>\n\n\n\n<p><code><b>java.lang.Runnable<\/b><\/code><b>:<\/b> This interface has just one method, <code>run()<\/code>. You use it to define a task that a separate thread (a lightweight part of a program) can carry out. For example, when you want to run code in the background without freezing your main program, you would put that code inside a <code>Runnable<\/code>.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nclass MyTask implements Runnable {\n    @Override\n    public void run() {\n        System.out.println(&quot;This task is now running in a new thread.&quot;);\n    }\n}\n\n\/\/ How to use it to start a new thread:\nThread thread = new Thread(new MyTask());\nthread.start(); \/\/ This starts the new thread, running MyTask&#039;s run() method.\n<\/pre><\/div>\n\n\n<p><code><b>java.util.List<\/b><\/code><b>:<\/b> This interface sets the rules for collections of items that have an order. Specific types of lists, like <code>ArrayList<\/code> and <code>LinkedList<\/code>, then provide the actual ways to store and manage these ordered items. You can write code that works with any type of <code>List<\/code> because they all follow the <code>List<\/code> interface's rules.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nimport java.util.ArrayList;\nimport java.util.List;\n\nList&amp;lt;String&gt; names = new ArrayList&amp;lt;&gt;(); \/\/ ArrayList implements the List interface\nnames.add(&quot;Alice&quot;);\nnames.add(&quot;Bob&quot;);\nSystem.out.println(&quot;Names in the list: &quot; + names);\n<\/pre><\/div>\n\n\n<p><code><b>java.awt.event.ActionListener<\/b><\/code><b>:<\/b> In programs with graphical user interfaces (GUIs), this interface is very important for handling things a user does, like clicking a button. When a user clicks a button, the <code>actionPerformed()<\/code> method from the <code>ActionListener<\/code> is called to react to that click.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nimport javax.swing.*; \/\/ Used for GUI elements\nimport java.awt.event.ActionEvent; \/\/ Represents an action event\nimport java.awt.event.ActionListener; \/\/ The interface for listening to actions\n\npublic class MyButtonApp {\n    public static void main(String&#x5B;] args) {\n        JFrame frame = new JFrame(&quot;Button Example&quot;); \/\/ Creates a window\n        JButton button = new JButton(&quot;Click Me&quot;); \/\/ Creates a button\n\n        button.addActionListener(new ActionListener() { \/\/ Attaches an action listener to the button\n            @Override\n            public void actionPerformed(ActionEvent e) { \/\/ This code runs when the button is clicked\n                JOptionPane.showMessageDialog(frame, &quot;The button was clicked!&quot;);\n            }\n        });\n\n        frame.add(button); \/\/ Adds the button to the window\n        frame.setSize(300, 200); \/\/ Sets the window size\n        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); \/\/ What happens when you close the window\n        frame.setVisible(true); \/\/ Makes the window appear\n    }\n}\n<\/pre><\/div>\n\n\n<p>Understanding these examples helps you truly see how powerful interfaces can be in real programs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-interfaces-might-affect-performance\">How Interfaces Might Affect Performance<\/h2>\n\n\n\n<p>While interfaces offer great benefits for designing your code, it is good to know a little about how they might affect how fast your program runs. When you call a method using a variable that is an interface type, Java has to figure out which specific version of that method to call at the exact moment the program runs.<\/p>\n\n\n\n<p>This process is called <b>dynamic dispatch<\/b>. It can add a very small amount of time compared to calling a method directly on a known class. For most applications, this tiny delay is not important. However, in very fast systems where every millisecond counts and you make many, many interface calls, it is something to consider. Modern Java systems are very good at making this process fast, so it usually does not cause problems.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>Interfaces are a very basic and important part of programming in Java. They help you make your code more abstract, more flexible, and easier to reuse. You should use them to define clear rules for your classes. They are essential for building software systems that you can easily change and keep up-to-date in the future.<\/p>\n\n\n\n<p>Try this example yourself:<\/p>\n\n\n\n<p>Let's make an interface called <code>Shape<\/code> that has a method to get its area. Then, create two classes, <code>Circle<\/code> and <code>Rectangle<\/code>, that both use the <code>Shape<\/code> interface. Each class will provide its own way to calculate its area.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/\/ Step 1: Define the Shape interface. This sets the rule that every Shape must have a getArea() method.\npublic interface Shape {\n    double getArea(); \/\/ This method will return the area of the shape.\n}\n\n\/\/ Step 2: Create the Circle class, which uses the Shape interface.\npublic class Circle implements Shape {\n    private double radius; \/\/ A circle needs a radius to calculate its area.\n\n    public Circle(double radius) {\n        this.radius = radius;\n    }\n\n    @Override\n    public double getArea() { \/\/ This is how a Circle calculates its area.\n        return Math.PI * radius * radius;\n    }\n}\n\n\/\/ Step 3: Create the Rectangle class, which also uses the Shape interface.\npublic class Rectangle implements Shape {\n    private double width; \/\/ A rectangle needs a width.\n    private double height; \/\/ And it needs a height.\n\n    public Rectangle(double width, double height) {\n        this.width = width;\n        this.height = height;\n    }\n\n    @Override\n    public double getArea() { \/\/ This is how a Rectangle calculates its area.\n        return width * height;\n    }\n}\n\n\/\/ Step 4: Test your implementations. This main class will create objects of Circle and Rectangle\n\/\/ and use their getArea() methods through the Shape interface.\npublic class ShapeCalculator {\n    public static void main(String&#x5B;] args) {\n        Shape circle = new Circle(5.0); \/\/ We create a Circle object but store it as a Shape.\n        System.out.println(&quot;The area of the Circle is: &quot; + circle.getArea());\n\n        Shape rectangle = new Rectangle(4.0, 6.0); \/\/ We create a Rectangle object but store it as a Shape.\n        System.out.println(&quot;The area of the Rectangle is: &quot; + rectangle.getArea());\n    }\n}\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>An interface in Java gives a clear set of rules for classes to follow. It helps you make your code more flexible and allows a class to have many types of behaviors. When you understand how to use interfaces well, you can write Java programs that are easy to change and keep up-to-date.<\/p>\n","protected":false},"author":41,"featured_media":109011,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[25860],"tags":[36826],"content_type":[],"class_list":["post-91447","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-java"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.6 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Interface in Java - An In-Depth Guide<\/title>\n<meta name=\"description\" content=\"Learn what Java interfaces are, their key benefits, and how to use and implement them in your programs. This guide covers abstraction, multiple behaviors, and real-world examples to help you master interfaces in Java.\" \/>\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.mygreatlearning.com\/blog\/interface-in-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java Interfaces: A Complete Guide for Beginners\" \/>\n<meta property=\"og:description\" content=\"Learn what Java interfaces are, their key benefits, and how to use and implement them in your programs. This guide covers abstraction, multiple behaviors, and real-world examples to help you master interfaces in Java.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-14T10:13:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-27T04:42:51+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1191\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Great Learning Editorial Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Great_Learning\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Great Learning Editorial Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"Java Interfaces: A Complete Guide for Beginners\",\"datePublished\":\"2023-08-14T10:13:05+00:00\",\"dateModified\":\"2025-06-27T04:42:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/\"},\"wordCount\":1474,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface.jpg\",\"keywords\":[\"java\"],\"articleSection\":[\"IT\/Software Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/\",\"url\":\"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/\",\"name\":\"Interface in Java - An In-Depth Guide\",\"isPartOf\":{\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface.jpg\",\"datePublished\":\"2023-08-14T10:13:05+00:00\",\"dateModified\":\"2025-06-27T04:42:51+00:00\",\"description\":\"Learn what Java interfaces are, their key benefits, and how to use and implement them in your programs. This guide covers abstraction, multiple behaviors, and real-world examples to help you master interfaces in Java.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/#primaryimage\",\"url\":\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface.jpg\",\"contentUrl\":\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface.jpg\",\"width\":1191,\"height\":628,\"caption\":\"Java Interface\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/www.mygreatlearning.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"IT\/Software Development\",\"item\":\"https:\/\/www.mygreatlearning.com\/blog\/software\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Java Interfaces: A Complete Guide for Beginners\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/#website\",\"url\":\"https:\/\/www.mygreatlearning.com\/blog\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\/\/www.mygreatlearning.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg\",\"contentUrl\":\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\",\"https:\/\/x.com\/Great_Learning\",\"https:\/\/www.instagram.com\/greatlearningofficial\/\",\"https:\/\/www.linkedin.com\/school\/great-learning\/\",\"https:\/\/in.pinterest.com\/greatlearning12\/\",\"https:\/\/www.youtube.com\/user\/beaconelearning\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp\",\"contentUrl\":\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\/\/www.mygreatlearning.com\/\",\"https:\/\/in.linkedin.com\/school\/great-learning\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning\",\"https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Interface in Java - An In-Depth Guide","description":"Learn what Java interfaces are, their key benefits, and how to use and implement them in your programs. This guide covers abstraction, multiple behaviors, and real-world examples to help you master interfaces in Java.","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.mygreatlearning.com\/blog\/interface-in-java\/","og_locale":"en_US","og_type":"article","og_title":"Java Interfaces: A Complete Guide for Beginners","og_description":"Learn what Java interfaces are, their key benefits, and how to use and implement them in your programs. This guide covers abstraction, multiple behaviors, and real-world examples to help you master interfaces in Java.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","article_published_time":"2023-08-14T10:13:05+00:00","article_modified_time":"2025-06-27T04:42:51+00:00","og_image":[{"width":1191,"height":628,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface.jpg","type":"image\/jpeg"}],"author":"Great Learning Editorial Team","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Great_Learning","twitter_site":"@Great_Learning","twitter_misc":{"Written by":"Great Learning Editorial Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"Java Interfaces: A Complete Guide for Beginners","datePublished":"2023-08-14T10:13:05+00:00","dateModified":"2025-06-27T04:42:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/"},"wordCount":1474,"commentCount":0,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface.jpg","keywords":["java"],"articleSection":["IT\/Software Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/","url":"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/","name":"Interface in Java - An In-Depth Guide","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface.jpg","datePublished":"2023-08-14T10:13:05+00:00","dateModified":"2025-06-27T04:42:51+00:00","description":"Learn what Java interfaces are, their key benefits, and how to use and implement them in your programs. This guide covers abstraction, multiple behaviors, and real-world examples to help you master interfaces in Java.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface.jpg","width":1191,"height":628,"caption":"Java Interface"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/interface-in-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"IT\/Software Development","item":"https:\/\/www.mygreatlearning.com\/blog\/software\/"},{"@type":"ListItem","position":3,"name":"Java Interfaces: A Complete Guide for Beginners"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface.jpg",1191,628,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface-150x150.jpg",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface-300x158.jpg",300,158,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface-768x405.jpg",768,405,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface-1024x540.jpg",1024,540,true],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface.jpg",1191,628,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface.jpg",1191,628,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface-640x628.jpg",640,628,true],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface-96x96.jpg",96,96,true],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2023\/08\/java-interface-150x79.jpg",150,79,true]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"An interface in Java gives a clear set of rules for classes to follow. It helps you make your code more flexible and allows a class to have many types of behaviors. When you understand how to use interfaces well, you can write Java programs that are easy to change and keep up-to-date.","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/91447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=91447"}],"version-history":[{"count":10,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/91447\/revisions"}],"predecessor-version":[{"id":109181,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/91447\/revisions\/109181"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/109011"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=91447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=91447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=91447"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/content_type?post=91447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}