

{"id":13284,"date":"2018-04-12T10:08:43","date_gmt":"2018-04-12T10:08:43","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=13284"},"modified":"2026-05-22T17:09:47","modified_gmt":"2026-05-22T11:39:47","slug":"object-creation-in-java","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/object-creation-in-java\/","title":{"rendered":"Object Creation in Java &#8211; Different Ways \/ Methods"},"content":{"rendered":"<p>Java is an object-oriented language. A major concept of an OOP language is an object. An object helps access, name, and operate a program easily. In this article, we will look at different ways of object creation in Java. We know that class is just a blueprint of a program. It does not have any physical significance of its own. The physical entity of a class is an object. Whenever we instantiate an object, only after that is memory assigned to it.<\/p>\n<h3>What is an Object in Java?<\/h3>\n<p>In one word, an object is an instance of a class. We all know that a class does not have a physical significance of its own; the object represents the real-world entity of the class. An object has attributes or properties and behaviour or methods. A class doesn\u2019t have a memory of its own, as it does not have a physical state. Whenever we instantiate an object of that class, memory is allocated depending on the attributes.<\/p>\n<h3>Characteristics of an object<\/h3>\n<p>An object mainly has three characteristics:<\/p>\n<ul>\n<li><strong>State:<\/strong> The values stored in an object are known as the state of the object.<\/li>\n<li><strong>Behaviour:<\/strong> The behaviour of an object represents the functions performed by the object. They are mainly the methods present in that object.<\/li>\n<li><strong>Identity:<\/strong> Each object has a special ID or short name that is used to call the methods present in the object. This unique ID is known as the identity of the object. It is known only to the programmer, not the end-user.<\/li>\n<\/ul>\n<h3>Various techniques of object creation in Java<\/h3>\n<p>There are a total of five different methods by which we can instantiate an object. They are as follows:<\/p>\n<ul>\n<li>Using a new keyword<\/li>\n<li>Using the newInstance() method of the Class<\/li>\n<li>Using the newInstance() method of the constructor class<\/li>\n<li>Using clone() method<\/li>\n<li>Using deserialization<\/li>\n<\/ul>\n<p>Let us understand each of these methods individually.<\/p>\n<h4>1. Using the new keyword<\/h4>\n<p>The new keyword is the most common technique used to instantiate an object. Therefore, the new keyword calls the constructor of the object and creates a new instance of the class.<\/p>\n<p><strong>Syntax of the new keyword in Java:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">ClassName ObjectName = new Class Name();\r\n<\/pre>\n<p><strong>Code to understand object creation with the new keyword:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package com.DataFlair.ObjectCreation;\r\npublic class NewKeyword\r\n{\r\n    void show()    \r\n    {    \r\n        System.out.println(\"DataFlair\");    \r\n    }    \r\n    public static void main(String[] args)   \r\n    {     \r\n        NewKeyword obj = new NewKeyword();\/\/object creation   \r\n        obj.show();\/\/Calling method that is part of the object\r\n    }    \r\n}\r\n\r\n<\/pre>\n<p><strong>The output of the above code:<\/strong><\/p>\n<div class=\"code-output\">DataFlair<\/div>\n<h4>2. Using newInstance() Method of Class<\/h4>\n<p>The newInstance() method of the Class class calls the default constructor to create the object. Hence, the method returns the newly created instance of the class of which the object is a part. However, the newInstance() method is part of the Constructor class.<\/p>\n<ul>\n<li><strong>IllegalAccessException:<\/strong> This exception is thrown when an object does not have the charge of accessing the methods or members of the class that are private.<\/li>\n<li><strong>InstantiationException:<\/strong> The instantiation exception in Java usually occurs when an abstract class tries to create its object. As a result, trying to create an object of instant class triggers the behaviour of the abstract class.<\/li>\n<li><strong>ExceptionInInitializerError:<\/strong> This error arises when a block or variable that is static throws an exception.<\/li>\n<\/ul>\n<p><strong>Syntax of newInstance() Method of Class:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">public T newInstance() throws InstantiationException, IllegalAccessException  \r\n<\/pre>\n<p><strong>The method throws the following exceptions:<\/strong><\/p>\n<ul>\n<li>IllegalAccessException<\/li>\n<li>InstantiationException<\/li>\n<li>ExceptionInInitializerError<\/li>\n<\/ul>\n<p><strong>We can create an object in the following ways:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">ClassName object = ClassName.class.newInstance();<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">ClassName object = (ClassName) Class.forName(\"Name of Full Class\").newInstance();<\/pre>\n<p>The forName() method is a static method that takes a className as a parameter and returns the object of the class. It just loads the class into the program but does not create an object. Thus, if the class cannot be loaded, it gives a ClassNotFoundException and a LinkageError if the linkage has failed.<\/p>\n<p>The newInstance() method only works if the class has a public default constructor.<\/p>\n<p><strong>Code to create an object using newInstance() Class class:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package com.DataFlair.ObjectCreation;\r\npublic class InstanceMethodClass\r\n{\r\n  String name = \"DataFlair\";\r\n  public static void main(String[] args)\r\n  {\r\n    try\r\n    {\r\n      Class obj1 = Class.forName(\"com.DataFlair.ObjectCreation.InstanceMethodClass\");\r\n      InstanceMethodClass obj =(InstanceMethodClass) obj1.newInstance();\r\n      System.out.println(obj.name);\r\n    }\r\n    catch (Exception e)\r\n    {\r\n      e.printStackTrace();\r\n    }\r\n  }\r\n}\r\n<\/pre>\n<p><strong>The output of the above code:<\/strong><\/p>\n<div class=\"code-output\">DataFlair<\/div>\n<h4>3. Using newInstance() Method of Constructor class<\/h4>\n<p>This method is similar to the previous method. It is also known as a reflective way to create an object. The method is defined in the Constructor class of java.lang.reflect package. Unlike the previous method, here we can use parameterized constructors as well as private constructors. This is the reason why this method is preferred over the Class class newInstance() method.<\/p>\n<p><strong>Syntax of newInstance() Method of the Constructor class in Java:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Public T newInstance(Object... initargs) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException  \r\n<\/pre>\n<p>The newInstance() method passes an array of objects as an argument. It returns a newly created object by calling the constructor of the class.<\/p>\n<p>The method throws the following exceptions:<\/p>\n<ul>\n<li>IllegalAccessException<\/li>\n<li>IllegalArgumentException<\/li>\n<li>InstantiationException<\/li>\n<li>InvocationTargetException<\/li>\n<li>ExceptionInInitializerError<\/li>\n<\/ul>\n<p><strong>Syntax of creating an object:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Constructor&lt;ClassName&gt; constructor = ClassName.class.getConstructor();   \r\nClassName ObjectName = constructor.newInstance();  \r\n<\/pre>\n<p><strong>Code to create an object using the Constructor class newInstance() method:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package com.DataFlair.ObjectCreation;\r\nimport java.lang.reflect.*;\r\npublic class InstanceMethodConstructor\r\n{\r\n  private String name;\r\n  public void Name(String name)\r\n  {\r\n    this.name = name;\r\n  }\r\n  public static void main(String[] args)\r\n    {\r\n    try\r\n    {\r\n      Constructor&lt;InstanceMethodConstructor&gt; constructor = InstanceMethodConstructor.class.getDeclaredConstructor();\r\n      InstanceMethodConstructor obj = constructor.newInstance();\r\n      obj.Name(\"DataFlair\");\r\n      System.out.println(obj.name);\r\n    }\r\n    catch (Exception e)\r\n    {\r\n      e.printStackTrace();\r\n    }\r\n  }\r\n}\r\n\r\n<\/pre>\n<p><strong>The output of the above code:<\/strong><\/p>\n<div class=\"code-output\">DataFlair<\/div>\n<h4>4. Using the clone() Method in Java<\/h4>\n<p>The clone() method is present inside the Object class. It can create a copy of a preexisting object and return it. It copies the previous object\u2019s properties into the newly created object. The clone() method doesn\u2019t call the constructor. If the object to be copied does not support a cloneable interface, the method will throw CloneNotSupportedException.<\/p>\n<p><strong>Syntax of clone() Method in Java:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">protected Object clone() throws CloneNotSupportedException  \r\n<\/pre>\n<p><strong>Creating a new object from an old object:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">ClassName newobjectname = (ClassName) oldobjectname.clone();  \r\n<\/pre>\n<p><strong>Code to create a new object using the clone() method:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package com.DataFlair.ObjectCreation;\r\npublic class CloneMethod implements Cloneable\r\n{\r\n  @Override\r\n  protected Object clone() throws CloneNotSupportedException\r\n  {\r\n    return super.clone();\r\n  }\r\n  String name = \"DataFlair\";\r\n  public static void main(String[] args)\r\n  {\r\n    CloneMethod obj1 = new CloneMethod();\r\n    try\r\n    {\r\n      CloneMethod obj2 = (CloneMethod) obj1.clone();\r\n      System.out.println(obj2.name);\r\n    }\r\n    catch (CloneNotSupportedException e)\r\n    {\r\n      e.printStackTrace();\r\n    }\r\n  }\r\n}\r\n<\/pre>\n<p><strong>The output of the above code:<\/strong><\/p>\n<div class=\"code-output\">DataFlair<\/div>\n<h4>5. Using Deserialization in Java<\/h4>\n<p>Serialization in Java means to convert an object into a sequence of bytes. The reverse of serialization is deserialization. The JVM creates an object whenever we deserialize an object. It does not use a constructor to create objects. To use deserialization, the serialization interface must be implemented first.<\/p>\n<p><span style=\"font-weight: 400\">However, this technique is valuable for persisting objects across program executions by converting them into a byte stream and then deserializing them back into objects when needed. It&#8217;s particularly useful for storing and retrieving object data in files or databases.<\/span><\/p>\n<p><strong>Syntax of Serialization in Java:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">public final void writeObject(object x) throws IOException<\/pre>\n<p><strong><strong>Syntax of Deserialization in Java:<\/strong><\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">public final Object readObject() throws IOException,ClassNotFoundException<\/pre>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/using-deserialization.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-109009\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/using-deserialization.webp\" alt=\"using deserialization\" width=\"1026\" height=\"425\" \/><\/a><\/p>\n<p>First, we create a class with a serialization interface, so that its object can be serialized and deserialized.<\/p>\n<p><strong>Serialization interface enabled class in Java:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package com.DataFlair.ObjectCreation;\r\nimport java.io.Serializable;\r\npublic class Intern implements Serializable\r\n{\r\n    int Internid;    \r\n    String InternName;    \r\n    public Intern(int Internid, String InternName)   \r\n    {    \r\n       this.Internid = Internid;    \r\n       this.InternName = InternName;    \r\n    }    \r\n}\r\n<\/pre>\n<p><strong>Serialization of the Object of the Intern Class:<\/strong><br \/>\nWe will serialize an object of the Intern class by using the writeObject() method of the ObjectOutputStream class. Therefore, the object state will be saved in the interns.txt file.<\/p>\n<p><strong>Code to serialize an object of the Intern Class:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package com.DataFlair.ObjectCreation;\r\nimport java.io.*;\r\npublic class Serialization\r\n{\r\n    public static void main(String args[])  \r\n    {    \r\n        try  \r\n        {        \r\n            Intern I = new Intern(1,\"Arka Ghosh\");  \r\n            FileOutputStream fout=new FileOutputStream(\"interns.txt\"); \r\n            ObjectOutputStream out=new ObjectOutputStream(fout);    \r\n            out.writeObject(I);    \r\n            out.flush();       \r\n            out.close();    \r\n            System.out.println(\"Created text file successfully!!!\");    \r\n        }  \r\n        catch(Exception e)  \r\n        {  \r\n            System.out.println(e);  \r\n        }    \r\n    }    \r\n}\r\n<\/pre>\n<p><strong>The output of the above code is:<\/strong><\/p>\n<div class=\"code-output\">Created text file successfully!!!<\/div>\n<p><strong>Deserialization of the object of the Intern Class:<\/strong><br \/>\nWe use the readObject() method of the ObjectInputStream class to deserialize the object.<\/p>\n<p><strong>Code to Deserialize the serialized object:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package com.DataFlair.ObjectCreation;\r\nimport java.io.*;\r\npublic class Deserialization\r\n{\r\n    public static void main(String args[])  \r\n    {    \r\n        try  \r\n        {    \r\n            ObjectInputStream in=new ObjectInputStream(new FileInputStream(\"interns.txt\"));\r\n            Intern I1=(Intern)in.readObject();\r\n            System.out.println(\"Intern ID and Name is:\");\r\n            System.out.println(I1.Internid+\" \"+I1.InternName);        \r\n            in.close();    \r\n        }  \r\n        catch(Exception e)  \r\n        {  \r\n        System.out.println(e);  \r\n        }    \r\n    }    \r\n}\r\n<\/pre>\n<p><strong>The output of the above code:<\/strong><\/p>\n<div class=\"code-output\">Intern ID and Name is:<br \/>\n1 Arka Ghosh<\/div>\n<h3>Conclusion<\/h3>\n<p>So, we saw in this article how objects can be created using so many different methods. However, creating an object is essential, as it is required in almost every program to make the program readable. That is why it is very important to know the different ways to create an object.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Java is an object-oriented language. A major concept of an OOP language is an object. An object helps access, name, and operate a program easily. In this article, we will look at different ways&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":13294,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[2535,6086,9179,15280,15283,15292,15293,15294,15834],"class_list":["post-13284","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-classes-and-objects-in-java-example-programs","tag-how-to-create-object-in-java-with-example","tag-object-creation-in-java","tag-using-clone-method","tag-using-deserialization","tag-using-new-instance","tag-using-new-keyword","tag-using-newinstance-method-of-constructor-class","tag-what-is-object-in-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Object Creation in Java - Different Ways \/ Methods - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn ways of Object Creation in Java Using new Keyword, new instance, Clone() Method, Deserialization, Using newInstance() method etc.\" \/>\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\/object-creation-in-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Object Creation in Java - Different Ways \/ Methods - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn ways of Object Creation in Java Using new Keyword, new instance, Clone() Method, Deserialization, Using newInstance() method etc.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/object-creation-in-java\/\" \/>\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-04-12T10:08:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-22T11:39:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/Different-ways-to-create-objects-in-Java-01.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":"Object Creation in Java - Different Ways \/ Methods - DataFlair","description":"Learn ways of Object Creation in Java Using new Keyword, new instance, Clone() Method, Deserialization, Using newInstance() method etc.","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\/object-creation-in-java\/","og_locale":"en_US","og_type":"article","og_title":"Object Creation in Java - Different Ways \/ Methods - DataFlair","og_description":"Learn ways of Object Creation in Java Using new Keyword, new instance, Clone() Method, Deserialization, Using newInstance() method etc.","og_url":"https:\/\/data-flair.training\/blogs\/object-creation-in-java\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-04-12T10:08:43+00:00","article_modified_time":"2026-05-22T11:39:47+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/Different-ways-to-create-objects-in-Java-01.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\/object-creation-in-java\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/object-creation-in-java\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Object Creation in Java &#8211; Different Ways \/ Methods","datePublished":"2018-04-12T10:08:43+00:00","dateModified":"2026-05-22T11:39:47+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/object-creation-in-java\/"},"wordCount":1119,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/object-creation-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/Different-ways-to-create-objects-in-Java-01.jpg","keywords":["classes and objects in java example programs","how to create object in java with example","Object Creation in Java","Using clone() method","Using deserialization","Using New Instance","Using new Keyword","Using newInstance() method of Constructor class","what is object in java"],"articleSection":["Java Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/object-creation-in-java\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/object-creation-in-java\/","url":"https:\/\/data-flair.training\/blogs\/object-creation-in-java\/","name":"Object Creation in Java - Different Ways \/ Methods - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/object-creation-in-java\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/object-creation-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/Different-ways-to-create-objects-in-Java-01.jpg","datePublished":"2018-04-12T10:08:43+00:00","dateModified":"2026-05-22T11:39:47+00:00","description":"Learn ways of Object Creation in Java Using new Keyword, new instance, Clone() Method, Deserialization, Using newInstance() method etc.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/object-creation-in-java\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/object-creation-in-java\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/object-creation-in-java\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/Different-ways-to-create-objects-in-Java-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/Different-ways-to-create-objects-in-Java-01.jpg","width":1200,"height":628,"caption":"Object Creation in Java"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/object-creation-in-java\/#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":"Object Creation in Java &#8211; Different Ways \/ Methods"}]},{"@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\/13284","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=13284"}],"version-history":[{"count":13,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/13284\/revisions"}],"predecessor-version":[{"id":148413,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/13284\/revisions\/148413"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/13294"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=13284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=13284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=13284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}