{"id":77499,"date":"2020-03-31T11:26:14","date_gmt":"2020-03-31T05:56:14","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=77499"},"modified":"2020-03-31T11:26:14","modified_gmt":"2020-03-31T05:56:14","slug":"java-type-conversion","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/java-type-conversion\/","title":{"rendered":"Java Type Conversion &#8211; Time to upskill your Programming"},"content":{"rendered":"<p>There are some cases while coding when different types of constants and variables mix in an expression. To perform operations on them, we need to convert them into the same type.<\/p>\n<p>Here comes the concept of Type Conversion or Type Casting in Java, which is used to convert one predefined value to the other. In this Java article, we will discuss everything you need to know about type casting in Java. We will cover its types with examples.<\/p>\n<h3>What is Type Conversion in Java?<\/h3>\n<p>Type Conversion or Type Casting is the process of converting a variable of one predefined type into another.<\/p>\n<p>If these data types are compatible with each other, the compiler automatically converts them and if they are not compatible, then the programmer needs to typecast them explicitly. Don\u2019t get confused with the word <strong>compatible<\/strong>, we are going to cover this term in our article.<\/p>\n<h4>Types of Type Conversion in Java<\/h4>\n<p>Java facilitates type conversion in two forms:<\/p>\n<ol>\n<li>Implicit (Automatic) Type Conversion<\/li>\n<li>Explicit Type Conversion<\/li>\n<\/ol>\n<h5>Implicit Type Conversion<\/h5>\n<p>Implicit Type Conversion or Automatic type conversion is a process of automatic conversion of one data type to another by the compiler, without involving the programmer.<\/p>\n<p>This process is also called <strong>Widening Conversion<\/strong> because the compiler converts the value of narrower (smaller size) <em><strong>data type<\/strong><\/em> into a value of a broader (larger size) data type without loss of information. The implicit data type conversion is possible only when:<\/p>\n<ul>\n<li>The two data types are compatible with each other.<\/li>\n<li>There is a need to convert a smaller or narrower data type to the larger type size.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/03\/implicit-type-conversion-in-java.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-77810\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/03\/implicit-type-conversion-in-java.jpg\" alt=\"\" width=\"644\" height=\"364\" \/><\/a><\/p>\n<p>The above image shows the conversions that Java allows. For example, the compiler automatically converts byte to short because the byte is smaller ( 8 bits ) or narrower than short ( 16 bits ).<\/p>\n<p><em>byte &#8212;&#8212;&#8212; is convertible to &#8212;&#8212;&#8212;&#8212;-&gt; short, int, long, float, or double<\/em><br \/>\n<em>Short &#8212;&#8212;&#8212; is convertible to &#8212;&#8212;&#8212;&#8212;-&gt; int, long, float, or double<\/em><br \/>\n<em>char &#8212;&#8212;&#8212; is convertible to &#8212;&#8212;&#8212;&#8212;-&gt; int, long, float, or double<\/em><br \/>\n<em>int &#8212;&#8212;&#8212; is convertible to &#8212;&#8212;&#8212;&#8212;-&gt; long, float, or double<\/em><br \/>\n<em>long &#8212;&#8212;&#8212; is convertible to &#8212;&#8212;&#8212;&#8212;-&gt; float or double<\/em><br \/>\n<em>float &#8212;&#8212;&#8212; is convertible to &#8212;&#8212;&#8212;&#8212;-&gt; double<\/em><\/p>\n<p><strong>Code to understand Automatic Type Conversion in Java:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.typeconversion;\npublic class ImplicitTypeConversion\n{\n  public static void main(String[] args)\n  {\n    int intVariable = 25;\n    long longVariable = intVariable;\n    float floatVariable = longVariable;\n    double doubleVariable = floatVariable;\n    System.out.println(\"Integer value is: \" +intVariable);\n    System.out.println(\"Long value is: \" +longVariable);\n    System.out.println(\"Float value is: \" +floatVariable);\n    System.out.println(\"Double value is: \" +doubleVariable);\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Integer value is: 25<br \/>\nLong value is: 25<br \/>\nFloat value is: 25.0<br \/>\nDouble value is: 25.0<\/div>\n<h5>Explicit Type Conversion<\/h5>\n<p>The Explicit Type Conversion is a process of explicitly converting a type to a specific type. We also call it <strong>Narrowing Conversion<\/strong>. The typecasting is done manually by the programmer, and not by the compiler.<\/p>\n<p>We need to do explicit or narrowing type conversion when the value of a broader (higher size) data type needs to be converted to a value of a narrower (lower size) data type. For example, <strong>double<\/strong> data type explicitly converted into int type.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/03\/explicit-type-conversion-in-java.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-77811\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/03\/explicit-type-conversion-in-java.jpg\" alt=\"\" width=\"690\" height=\"214\" \/><\/a><\/p>\n<p><strong>Syntax of explicit type conversion in Java:<\/strong><\/p>\n<p>The following is the syntax of typecasting in Java<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">(type) expression;<\/pre>\n<p>Where <strong>type<\/strong> is a valid data type to which the conversion is to be done. For example, if we want to make sure that the expression <strong>(x \/ y + 5)<\/strong> evaluates to type float, we will write it as,<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">(float)(x \/ y +5);<\/pre>\n<p>If we try to convert the smaller data types to larger data types without typecasting, then there will be a compilation error:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.typeconversion;\npublic class Test\n{\n  public static void main(String[] argv)\n  {\n    int intVariable = 10;\n    long longVariable = 7878;\n    intVariable = longVariable;\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Exception in thread &#8220;main&#8221; java.lang.Error: Unresolved compilation problem:<br \/>\nType mismatch: cannot convert from long to intat project1\/com.techvidvan.typeconversion.Test.main(Test.java:8)<\/div>\n<p><strong>The correct code is:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.typeconversion;\npublic class Test\n{\n  public static void main(String[] argv)\n  {\n    int intVariable = 10;\n    long longVariable = 7878;\n\n    \/\/Type Casting to int\n    intVariable = (int) longVariable;\n    System.out.println(intVariable);\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">7878<\/div>\n<p><strong>Code to understand Explicit Type Conversion in Java:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.typeconversion;\npublic class ExplicitTypeConversion\n{\n  public static void main(String[] args)\n  {\n    double doubleVariable = 135.78;\n\n    \/\/explicit type casting\n    long longVariable = (long)doubleVariable;\n\n    \/\/explicit type casting\n    int intVariable = (int)longVariable;\n\n    System.out.println(\"Double value: \"+doubleVariable);\n    System.out.println(\"Long value: \"+longVariable);\n    System.out.println(\"Integer value: \"+intVariable);\n\n    char charVariable = 'A';\n\n    \/\/explicit type casting\n    int intVariable1 = (int)charVariable;\n    System.out.println(\"\\nInteger value of \" +charVariable + \" is \" +intVariable1);\n\n    \/\/explicit type casting\n    long longVariable1 = (long)intVariable1;\n    System.out.println(\"Long value: \"+longVariable1);\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Double value: 135.78<br \/>\nLong value: 135<br \/>\nInteger value: 135Integer value of A is 65<br \/>\nLong value: 65<\/div>\n<h5>Assignment Compatibility<\/h5>\n<p>As we know that, we can assign a value of an integer type to a value of the same type or wider type without typecasting. In this case, the compiler automatically widens the value to the appropriate type.<\/p>\n<p>A value of any integer type can be cast to a value of any other integer type. However, Integer types can not be cast to a boolean value, nor can the boolean type be cast to an integer type value.<\/p>\n<p>The following table shows whether an assignment from a particular integer type to another integer type can be directly done or it requires a typecast.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/03\/assignment-compatibility-in-java.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-77812\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/03\/assignment-compatibility-in-java.jpg\" alt=\"\" width=\"752\" height=\"358\" \/><\/a><\/p>\n<h4>Conversion of Primitive types<\/h4>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/03\/type-conversion-of-primitive-types-in-java.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-77813\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/03\/type-conversion-of-primitive-types-in-java.jpg\" alt=\"\" width=\"802\" height=\"420\" \/><\/a><\/p>\n<p>When performing type conversion with primitive types, the following situations may arise:<\/p>\n<h5>1. Assignment Operation<\/h5>\n<p>Assignment conversion occurs when we assign a variable of one type to another type. We can only implement the widening or implicit type conversion through an assignment operation. For example,<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">int number1 ;\nbyte number2 ;\nnumber1 = number2 ;\t    \/\/number2 automatically converts to int<\/pre>\n<h4>2. Integer Promotion<\/h4>\n<p>When evaluating the integer expressions, Java automatically recognizes the need for type conversion and performs it accordingly by carrying out Type Promotion. Consider the following Java example:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">int num = 5\ndouble sum = 30;\ndouble average = sum \/ num;\t\/\/num also converts to double<\/pre>\n<h5>3. Conversion during a method call<\/h5>\n<p>This type of conversion takes place when we call a method and the passed argument of a datatype to the method expects a different data type.<\/p>\n<p>Suppose the argument passed to the method is of int type and the method requires a long data type then the int automatically converts into long at the time of calling the method.<\/p>\n<p>For example,<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">float floatVariable = 4.56f;\ndouble doubleVariable = Math.sin(floatVariable);\n\/\/method sin() expects double and hence floatVariable converts to double<\/pre>\n<h4>Conversion and Casting of Reference Types<\/h4>\n<p>We know that class, interface, and an array include reference types. There can\u2019t be an arithmetic promotion with reference type conversion since object references cannot be arithmetic operands.<\/p>\n<h5>Rules for Reference Type Conversion<\/h5>\n<ul>\n<li>We can convert class type to a class type or to an interface type. Converting to a class type requires that the new type must be the parent class of the old type. And, converting to an interface type requires that the old class must implement the interface.<\/li>\n<li>We can convert an interface type only to an interface type or to the Object. If we convert to the interface type, then the new type must be a parent interface of the old type.<\/li>\n<li>We can convert an array to the Cloneable or Serializable interface, to the Object class, or to an array.<\/li>\n<\/ul>\n<p><strong>Code to understand the conversion of reference types:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.typeconversion;\npublic class ReferenceTypeConversion\n{\n  class Shape\n  {\n\n  }\n  class Square extends Shape\n  {\n\n  }\n  public static void main(String[] args)\n  {\n    Shape s1 = new Shape();\n    Square s2 = new Square();\n\n    s1 = s2; \/\/allowed\n    s2 = s1; \/\/not allowed\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Type mismatch: cannot convert from ReferenceTypeConversion.Shape to ReferenceTypeConversion.Square<\/div>\n<h5>Reference Type Conversion during Method Invocation<\/h5>\n<p>The Conversion of a reference type is also possible when we pass a reference type to a method that accepts an argument of a different type. We can convert to a superclass but not to a subclass. For Example,<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.typeconversion;\npublic class ReferenceTypeConversion\n{\n  class Shape\n  {\n\n  }\n  class Square extends Shape\n  {\n\n  }\n  public static void myMethod(Shape s)\n  {\n\n  }\n  public static void main(String[] args)\n  {\n    Square s1 = new Square();\n    myMethod(s1);\n  }\n}<\/pre>\n<h3>Summary<\/h3>\n<p>We call the process of changing values from one data type to another as Typecasting or Type Conversion. Using Type Casting, you can convert larger or wider types to the smaller or narrower types.<\/p>\n<p>And, if the conversion needs to be done from smaller or narrower types to the larger or wider types, then the compiler automatically converts them using implicit type conversion. We can also typecast the reference variables.<\/p>\n<p>In this article, we discussed the implicit and explicit type conversions. Implicit Conversion is also called automatic or Widening conversion and Explicit Type conversion is also called Narrowing Conversion. I hope this article will help you sharpen your concepts in type conversion in Java.<\/p>\n<p>Thank you for reading our article. If you have any doubts related to Java Type Conversion, do let us know by dropping a comment below.<\/p>\n<p>Keep Learning \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are some cases while coding when different types of constants and variables mix in an expression. To perform operations on them, we need to convert them into the same type. Here comes the&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":77813,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[183],"tags":[2083,2084,2085,2086,2087,2088,2089,2090],"class_list":["post-77499","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-assignment-compatibility","tag-explicit-type-conversion","tag-implicit-type-conversion","tag-java-automatic-type-conversion","tag-java-type-conversion","tag-java-type-conversion-types","tag-reference-type-conversion","tag-type-conversion-in-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Java Type Conversion - Time to upskill your Programming - TechVidvan<\/title>\n<meta name=\"description\" content=\"Make yourself aware with the concept of Java Type Conversion in detail with some coding examples. Also, explore Implicit &amp; Explicit Type Conversion 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:\/\/techvidvan.com\/tutorials\/java-type-conversion\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java Type Conversion - Time to upskill your Programming - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Make yourself aware with the concept of Java Type Conversion in detail with some coding examples. Also, explore Implicit &amp; Explicit Type Conversion in Java.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/java-type-conversion\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-31T05:56:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/03\/type-conversion-of-primitive-types-in-java.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java Type Conversion - Time to upskill your Programming - TechVidvan","description":"Make yourself aware with the concept of Java Type Conversion in detail with some coding examples. Also, explore Implicit & Explicit Type Conversion 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:\/\/techvidvan.com\/tutorials\/java-type-conversion\/","og_locale":"en_US","og_type":"article","og_title":"Java Type Conversion - Time to upskill your Programming - TechVidvan","og_description":"Make yourself aware with the concept of Java Type Conversion in detail with some coding examples. Also, explore Implicit & Explicit Type Conversion in Java.","og_url":"https:\/\/techvidvan.com\/tutorials\/java-type-conversion\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2020-03-31T05:56:14+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/03\/type-conversion-of-primitive-types-in-java.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/java-type-conversion\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-type-conversion\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Java Type Conversion &#8211; Time to upskill your Programming","datePublished":"2020-03-31T05:56:14+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-type-conversion\/"},"wordCount":1196,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-type-conversion\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/03\/type-conversion-of-primitive-types-in-java.jpg","keywords":["Assignment Compatibility","Explicit Type Conversion","Implicit Type Conversion","Java Automatic Type Conversion","Java Type Conversion","Java Type Conversion Types","Reference Type Conversion","Type Conversion in Java"],"articleSection":["Java Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/java-type-conversion\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/java-type-conversion\/","url":"https:\/\/techvidvan.com\/tutorials\/java-type-conversion\/","name":"Java Type Conversion - Time to upskill your Programming - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-type-conversion\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-type-conversion\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/03\/type-conversion-of-primitive-types-in-java.jpg","datePublished":"2020-03-31T05:56:14+00:00","description":"Make yourself aware with the concept of Java Type Conversion in detail with some coding examples. Also, explore Implicit & Explicit Type Conversion in Java.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-type-conversion\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/java-type-conversion\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/java-type-conversion\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/03\/type-conversion-of-primitive-types-in-java.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/03\/type-conversion-of-primitive-types-in-java.jpg","width":802,"height":420,"caption":"type conversion in java"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/java-type-conversion\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Java Type Conversion &#8211; Time to upskill your Programming"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/77499","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=77499"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/77499\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/77813"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=77499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=77499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=77499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}