{"id":77465,"date":"2020-03-30T13:15:39","date_gmt":"2020-03-30T07:45:39","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=77465"},"modified":"2020-03-30T13:15:39","modified_gmt":"2020-03-30T07:45:39","slug":"java-switch-statement","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/java-switch-statement\/","title":{"rendered":"Java Switch Statement &#8211; Learn its Working with Coding Examples"},"content":{"rendered":"<p>We all use electrical switches in our regular lives to control the electrical equipment. For each particular electrical equipment, there is a unique switch to operate them. And, each switch can activate or deactivate only one item.<\/p>\n<p>Similarly, switches in Java are like these electrical switches only. Have you ever wondered how switch statement in Java helps us in decision-making?<\/p>\n<p>The answer is switch statements help us with decision making in Java. They are useful to execute one statement from multiple conditions or expressions.<\/p>\n<p>In this article, we are going to purely discuss and implement the switch case or switch statement in Java with examples.<\/p>\n<h3>Switch Statement in Java<\/h3>\n<p>A Java switch statement is a multiple-branch statement that executes one statement from multiple conditions. The switch statement successively checks the value of an expression with a list of integer (int, byte, short, long), character (char) constants, String (Since Java 7), or enum types.<\/p>\n<p>It also works with some <em><strong>Java Wrapper Classes<\/strong><\/em> like Byte, Short, Integer, and Long. When it finds a match, the statements associated with that test expression are executed.<\/p>\n<p>A Switch statement is like an if-else-if statement of Java. In other words, the switch statement checks the equality of a variable against multiple values.<\/p>\n<p><strong>The syntax or general form of a switch statement is:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">switch (expression)\n{\n     case value1:\n     statement1;\n     break;\n\n     case value2:\n     statement2;\n     break;\n     .\n     .\n     case valueN:\n     statementN;\n     break;\n\n     default:\n     statementDefault;\n}<\/pre>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/03\/switch-statement-in-java.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-77779\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/03\/switch-statement-in-java.jpg\" alt=\"\" width=\"524\" height=\"713\" \/><\/a><\/p>\n<h3>Working of a Switch Statement<\/h3>\n<p>The switch statement evaluates the <strong>conditional expression<\/strong> and matches the values against the constant values specified in the <strong>case statements<\/strong>.<\/p>\n<p>When it finds a match, the statement associated with that case is executed until it encounters a <strong>break<\/strong> statement. When there is no match, the <strong>default statement<\/strong> gets executed.<\/p>\n<p>If there is no <strong>break<\/strong> statement, the control flow moves to the next case below the matching case and this is called the <strong>fall-through.<\/strong><\/p>\n<h4>Some Important points about Switch Statements in Java<\/h4>\n<p>These are some important rules of the Java switch case:<\/p>\n<ul>\n<li>There is no limit for the number of cases in a switch statement. There can be one or \u2018N\u2019 number of cases in a switch statement.<\/li>\n<li>The case values should be unique and can\u2019t be duplicated. If there is a duplicate value, then it is a compilation error.<\/li>\n<li>The data type of the values for a case must be the same as the data type of the variable in the switch test expression.<\/li>\n<li>The values for a case must be constant or literal types. The values can be int, byte, short, int, long or char.<\/li>\n<li>We can also wrapper classes as the values of the cases that is, Integer, Long, Short, and Byte. Also, we can use the Strings and enums for the value of case statements.<\/li>\n<li>We use the break statement inside the switch case to end a statement.<\/li>\n<li>The break statement is optional, and in the absence of the break statement, the condition will continue to the next case.<\/li>\n<li>The default statement in the switch case is also not mandatory, but if there is no expression matching the case (or if all the matches fail), then nothing will execute. There is no need for a break statement in the default case.<\/li>\n<li>We can not use variables in a switch statement.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/03\/important-points-about-switch-statement-in-java.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-77780\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/03\/important-points-about-switch-statement-in-java.jpg\" alt=\"\" width=\"802\" height=\"420\" \/><\/a><\/p>\n<p><strong>Examples of Switch Statement in Java<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.switchstatement;\n\/\/A Java program to demonstrate the use of switch case\npublic class SwitchCaseDemo1\n{\n  public static void main(String[] args)\n  {\n    int day = 5;\n    switch (day) {\n    case 1:\n      System.out.println(\"Monday\");\n      break;\n    case 2:\n      System.out.println(\"Tuesday\");\n      break;\n    case 3:\n      System.out.println(\"Wednesday\");\n      break;\n    case 4:\n      System.out.println(\"Thursday\");\n      break;\n    case 5:\n      System.out.println(\"Friday\");\n      break;\n    case 6:\n      System.out.println(\"Saturday\");\n      break;\n    case 7:\n      System.out.println(\"Sunday\");\n      break;\n    default:\n      System.out.println(\"Invalid\");\n\n    }\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Friday<\/div>\n<h3>Skipping the break statement in Java Switch: Fall-Through<\/h3>\n<p>The <strong>break<\/strong> statement is optional in the switch case. But, the program will still continue to execute if we don\u2019t use any break statement. You can consider the below code for the same.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.switchstatement;\npublic class SwitchCaseDemo2\n{\n  \/\/Switch case example in Java where we are omitting the break statement\n  public static void main(String[] args)\n  {\n    int number = 20;\n    \/\/switch expression with integer value\n    switch(number)\n    {\n    \/\/switch cases without break statements\n    case 10:\n      System.out.println(\"Ten\");\n    case 20:\n      System.out.println(\"Twenty\");\n    case 30:\n      System.out.println(\"Thirty\");\n    default:\n      System.out.println(\"Not in 10, 20 or 30\");\n    }\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Twenty<br \/>\nThirty<br \/>\nNot in 10, 20 or 30<\/div>\n<h3>Multiple Case Statements for the same Operation<\/h3>\n<p>If there are multiple cases in the switch statement and you don\u2019t want to write any operation in a case statement, then the control moves to the next case until it encounters the break statement. For example:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.switchstatement;\npublic class Test\n{\n  public static void main(String args[])\n  {\n    int number = 10;\n    switch(number)\n    {\n    case 5 :\n      \/\/writing no operations for case 5\n\n    case 10 : System.out.println(\"The number is \" +number);\n    break;\n    default: System.out.println(\"The number is not 10\");\n    }\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">The number is 10<\/div>\n<h3>yield Instruction in Java Switch Statement<\/h3>\n<p>We can use the Java switch yield instruction from Java 13. It returns a value from a Java switch expression.<\/p>\n<p><strong>Code to understand yield in Java switch:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.switchstatement;\npublic class YieldInstruction\n{\n  public static void main(String args[ ])\n  {\n    String token = \"TechVidvan\";\n    int tokenType = switch(token)\n    {\n    case \"TechVidvan\": yield 0 ;\n    case \"Java\": yield 1 ;\n    default: yield -1 ;\n    };\n    System.out.println(tokenType);\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Value of tokenType is: 0<\/div>\n<h3>Nested Switch Statements in Java<\/h3>\n<p>When a switch statement has another switch statement inside it, it is called a nested switch statement. Let\u2019s see an example to understand the nested switch statements in Java.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.switchstatement;\npublic class NestedSwitchCaseDemo\n{\n  \/\/Java Switch Example where we are skipping the break statement\n  public static void main(String args[ ])\n  {\n    String branch=\"CSE\";\t\t\/\/Declaring string\n    int year=2;\t\t       \/\/Declaring integer\n\n    \/\/switch expression\n    \/\/Outer Switch\n    switch(year)\n    {\n    \/\/case statement\n    case 1:\n      System.out.println(\"Optional courses for first year: Engineering Drawing, Learning C\");\n      break;\n\n    case 2:\n    {\n      \/\/Inner switch\n      switch(branch)\n      {\n      case \"CSE\":\n        System.out.println(\"Optional Courses for second year CSE branch: Cyber Security, Big Data and Hadoop\");\n        break;\n      case \"CCE\":\n        System.out.println(\"Optional Courses for second year CCE branch: Machine Learning, Big Data and Hadoop\");\n        break;\n      case \"IT\":\n        System.out.println(\"Optional Courses for second year IT branch: Cloud Computing, Artificial Intelligence\");\n        break;\n      default:\n        System.out.println(\"Optional Courses: Optimization\");\n      }\n    }\n    }\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Optional Courses for second year CSE branch: Cyber Security, Big Data and Hadoop<\/div>\n<h4>Using Strings with Java Switch Statement<\/h4>\n<p>Since Java SE 7, we can use the strings in a switch expression. The case statement should be a string literal.<\/p>\n<p><strong>Code to understand the switch case with String:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.switchstatement;\npublic class SwitchStringExample\n{\n  public static void main(String[ ] args)\n  {\n    \/\/Declaring a String variable\n    String operation = \"Addition\";\n\n    int result = 0;\n    int number1 = 20, number2 = 10;\n\n    \/\/Using String in switch expression\n    switch(operation)\n    {\n    \/\/Using String Literal in switch case\n    case \"Addition\":\n      result = number1 + number2;\n      break;\n    case \"Subtraction\":\n      result = number1 - number2;\n      break;\n    case \"Multiplication\":\n      result = number1 * number2;\n      break;\n    default:\n      result = 0;\n      break;\n    }\n    System.out.println(\"The result is: \" +result);\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">The result is: 30<\/div>\n<h4>Using Character Literals with Java Switch Statement<\/h4>\n<p>We can use the data type \u2018char\u2019 with the switch statement. The following code explains the switch statement using the character literal.<\/p>\n<p><strong>Code to understand the switch case with Character Literals:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.switchstatement;\npublic class SwitchCharExample\n{\n  public static void main(String[] args)\n  {\n    \/\/Declaring char variable\n    char courseId = 'C';\n\n    \/\/Using char in switch expression\n    switch(courseId)\n    {\n    \/\/Using Character Literal in the switch case\n    case 'A':\n      System.out.println(\"Techvidvan's Python Course\");\n      break;\n    case 'B':\n      System.out.println(\"Techvidvan's Big Data and Hadoop Course\");\n      break;\n    case 'C':\n      System.out.println(\"Techvidvan's Java Course\");\n      break;\n    default:\n      System.out.println(\"Invalid course id\");\n    }\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Techvidvan&#8217;s Java Course<\/div>\n<h4>Using Enum with Java Switch Statement<\/h4>\n<p>It is also possible to use Java enums with a switch statement. Below is a Java example that creates a Java enum and then uses it in a switch statement.<\/p>\n<p><strong>Code to understand the switch case with the Java enums:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.techvidvan.switchstatement;\npublic class SwitchOnEnum\n{\n  private static enum Size\n  {\n    SMALL, MEDIUM, LARGE, X_LARGE\n  }\n  void switchOnEnum(Size size)\n  {\n    switch(size)\n    {\n\n    case SMALL:\n      System.out.println(\"Size is small\");\n      break;\n    case MEDIUM:\n      System.out.println(\"Size is medium\");\n      break;\n    case LARGE:\n      System.out.println(\"Size is large\");\n      break;\n    case X_LARGE:\n      System.out.println(\"Size is X-large\");\n      break;\n    default:\n      System.out.println(Size is not S, M, L, or XL\u201d);\n    }\n  }\n  public static void main(String args[])\n  {\n    SwitchOnEnum obj = new SwitchOnEnum();\n    obj.switchOnEnum(Size.LARGE);\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Size is large<\/div>\n<h4>Use Cases of Java Switch Statement<\/h4>\n<ul>\n<li>The Java switch expressions are useful where you have multiple choices, cases, or options and you need to test these values against a single value.<\/li>\n<li>Switch statements are mainly useful when we want to resolve one value to another. For example, when we need to convert the weekday (number) to a weekday (String), or vice versa.<\/li>\n<li>Switch expressions in Java are also useful in parsing String tokens into integer token types or, character types into numbers.<\/li>\n<\/ul>\n<h3>Summary<\/h3>\n<p>With this, we have come to an end of this tutorial on switch case statement in Java. And now you are well familiar with the switch statement in Java. We learned to implement it in many different scenarios according to our needs.<\/p>\n<p>A switch statement can help you with better decision making in Java. They are also very useful for parsing one type of value to the other. As a Java beginner, you should master this concept to become an expert in Java programming.<\/p>\n<p>Thank you for reading our article. Do share our article on Social Media.<\/p>\n<p>Happy Learning \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We all use electrical switches in our regular lives to control the electrical equipment. For each particular electrical equipment, there is a unique switch to operate them. And, each switch can activate or deactivate&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":77780,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[183],"tags":[1722,2078,2079,2080,2081,2082,1733],"class_list":["post-77465","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-break-statement-in-java","tag-example-of-switch-statement-in-java","tag-java-switch-statement","tag-java-switch-statement-working","tag-multiple-switch-statement-in-java","tag-nested-switch-statement-in-java","tag-switch-statement-in-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Java Switch Statement - Learn its Working with Coding Examples - TechVidvan<\/title>\n<meta name=\"description\" content=\"Learn Java Switch Statement along with some Important Points. We learned to implement switch statement in many different scenarios according to our needs.\" \/>\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-switch-statement\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java Switch Statement - Learn its Working with Coding Examples - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Learn Java Switch Statement along with some Important Points. We learned to implement switch statement in many different scenarios according to our needs.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/java-switch-statement\/\" \/>\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-30T07:45:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/03\/important-points-about-switch-statement-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 Switch Statement - Learn its Working with Coding Examples - TechVidvan","description":"Learn Java Switch Statement along with some Important Points. We learned to implement switch statement in many different scenarios according to our needs.","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-switch-statement\/","og_locale":"en_US","og_type":"article","og_title":"Java Switch Statement - Learn its Working with Coding Examples - TechVidvan","og_description":"Learn Java Switch Statement along with some Important Points. We learned to implement switch statement in many different scenarios according to our needs.","og_url":"https:\/\/techvidvan.com\/tutorials\/java-switch-statement\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2020-03-30T07:45:39+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/03\/important-points-about-switch-statement-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-switch-statement\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-switch-statement\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Java Switch Statement &#8211; Learn its Working with Coding Examples","datePublished":"2020-03-30T07:45:39+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-switch-statement\/"},"wordCount":1038,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-switch-statement\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/03\/important-points-about-switch-statement-in-java.jpg","keywords":["break statement in java","Example of Switch statement in Java","Java Switch Statement","Java Switch Statement Working","Multiple Switch Statement in Java","Nested Switch Statement in Java","Switch Statement in Java"],"articleSection":["Java Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/java-switch-statement\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/java-switch-statement\/","url":"https:\/\/techvidvan.com\/tutorials\/java-switch-statement\/","name":"Java Switch Statement - Learn its Working with Coding Examples - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-switch-statement\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-switch-statement\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/03\/important-points-about-switch-statement-in-java.jpg","datePublished":"2020-03-30T07:45:39+00:00","description":"Learn Java Switch Statement along with some Important Points. We learned to implement switch statement in many different scenarios according to our needs.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-switch-statement\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/java-switch-statement\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/java-switch-statement\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/03\/important-points-about-switch-statement-in-java.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/03\/important-points-about-switch-statement-in-java.jpg","width":802,"height":420,"caption":"important points of switch statement in java"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/java-switch-statement\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Java Switch Statement &#8211; Learn its Working with Coding Examples"}]},{"@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\/77465","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=77465"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/77465\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/77780"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=77465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=77465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=77465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}