{"id":78895,"date":"2020-06-01T10:00:00","date_gmt":"2020-06-01T04:30:00","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=78895"},"modified":"2020-06-01T10:00:00","modified_gmt":"2020-06-01T04:30:00","slug":"java-annotations","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/java-annotations\/","title":{"rendered":"Annotations in Java &#8211; Types, Examples and Uses"},"content":{"rendered":"<p>In our last tutorial, we studied Java Assertion in detail. In this Java Annotations tutorial, we will learn Java Annotation, how to apply them, and a list of annotations in Java Programming Language.<\/p>\n<p>For example, Marker, Single Value, and Full Java Annotations. We will also discuss Standard Java Annotations or built-in annotations in Java. We will discuss some Java annotation examples.<\/p>\n<h3>What is a Java Annotation?<\/h3>\n<p>Java Annotation is a kind of a tag that represents the metadata or information attached with class, interface, methods, or fields to show some additional information that Java compiler and JVM can use.<\/p>\n<p>Though Annotations are not a part of the Java code they allow us to add metadata information into our source code. Java introduced Annotations from JDK 5.<\/p>\n<p>There is no direct effect of Annotations on the operation of the code they annotate; they do not affect the execution of the program. Annotations provide supplemental information about a program.<\/p>\n<p>Some points about Annotations are:<\/p>\n<ul>\n<li>They start with \u2018@\u2019.<\/li>\n<li>They do not change the action or execution of a compiled program.<\/li>\n<li>Annotations help to associate metadata or information to the elements of the program like classes, instance variables, interfaces, constructors, methods, etc.<\/li>\n<li>We cannot consider Annotations as pure comments as they can change the way a compiler treats a program<\/li>\n<\/ul>\n<p><strong>Example of Java Annotation<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">class Base {\n  public void display() {\n    System.out.println(\"Base class display() method\");\n  }\n}\npublic class Derived extends Base {@Override\n  public void display(int x) {\n    System.out.println(\"Derived class display(int) method\");\n  }\n  public static void main(String args[]) {\n    Derived obj = new Derived();\n    obj.display();\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\nerror: method does not override or implement a method from a supertype<br \/>\n@Override<\/p>\n<p>If we remove parameter (int x) from the method or if we remove the @override annotation from the code, then the program compiles fine. The output will be:<\/p>\n<p>Base class display() method<\/p>\n<h3>Types of Java Annotations<\/h3>\n<p>There are five types of Java Annotations which are:<\/p>\n<ul>\n<li>Marker Annotations<\/li>\n<li>Single Value Annotations<\/li>\n<li>Full Annotations<\/li>\n<li>Type Annotation<\/li>\n<li>Repeating Annotation<\/li>\n<\/ul>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/05\/Types-of-Java-Annotations.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-78951\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/05\/Types-of-Java-Annotations.jpg\" alt=\"Annotations in java types\" width=\"492\" height=\"446\" \/><\/a><\/p>\n<h4>1. Marker Annotations<\/h4>\n<p>The only purpose of the Marker Annotation is to mark a declaration. The Marker Annotations do not contain any members and do not consist of any data.<\/p>\n<p>Therefore, the presence of these annotations as an annotation is sufficient. Since the marker interface in java contains no members, simply determining whether it is present or absent is sufficient. @Override is an example of Marker Annotation.<\/p>\n<p><strong>Example: &#8211;<\/strong> @TestAnnotation()<\/p>\n<h4>2. Single value Annotations<\/h4>\n<p>The Single Value Annotations as the name suggests, contain only one member. They allow a shorthand form of specifying the value of the member.<\/p>\n<p>When we apply this annotation, we only need to specify the value for that member and also do not need to specify the name of the member. However, in order to use this shorthand, there must be a value for the name of the member.<\/p>\n<p><strong>Example:<\/strong> @TestAnnotation(\u201ctesting\u201d);<\/p>\n<h4>3. Full Annotations<\/h4>\n<p>The full Annotations consist of multiple data members\/names, values, and pairs.<\/p>\n<p><strong>Example:-<\/strong> @TestAnnotation(owner= \u201dRahul\u201d, value= \u201dClass DataFlair\u201d)<\/p>\n<h4>4. Type Annotations in Java<\/h4>\n<p>The type annotations are applicable to any place where there is a use of a type. For example, if we want to annotate the return type of a method, we can declare these annotations with @Target annotation.<\/p>\n<p><strong>Code to demonstrate a Type Annotation<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import java.lang.annotation. * ;@Target(ElementType.TYPE_USE)@interface TypeAnnoDemo {}\n\npublic class MyClass {\n  public static void main(String[] args) {@TypeAnnoDemo String s = \"Hello,I am annotated with a type annotation\";\n    System.out.println(s);\n    myMethod();\n  }\n\n  static@TypeAnnoDemo int myMethod() {\n    System.out.println(\"There is a use of annotation with the return type of the function\u201d);\n        \t\treturn 0;\n    \t}\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\nI am annotated with a type annotation<br \/>\nThere is a use of annotation with the return type of the function\u201d);<\/p>\n<h4>5. Repeating Annotations in java<\/h4>\n<p>Repeating Annotations are the annotations that we apply to a single item more than once. The repeating annotations must be annotated with the @Repeatable annotation, which is present in the java.lang.annotation package. The value of this annotation specifies the container type for the repeatable annotation.<\/p>\n<p>There is a container specified as an annotation whose value field is an array of the repeatable annotation type. Hence, to create a repeatable annotation, firstly we need to create the container annotation, and then specify the annotation type as an argument to the @Repeatable annotation.<\/p>\n<p><strong>Code to demonstrate a repeatable annotation<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import java.lang. * ;@Retention(RetentionPolicy.RUNTIME)@Repeatable(MyRepeatedAnnos.class)@interface MyWords {\n  String word()\ndefault \"Hello World\";\n  int value()\ndefault 0;\n}\n\n\/\/ Creating a container annotation\n@Retention(RetentionPolicy.RUNTIME)@interface MyRepeatedAnnotations {\n  MyWords[] value();\n}\npublic class MyClass {\n\n  @MyWords(word = \"Data\", value = 1)@MyWords(word = \"Flair\", value = 2)\n  public static void myMethod() {\n    MyClass obj = new MyClass();\n\n    try {\n      Class &lt; ?&gt;c = obj.getClass();\n\n      Method m = c.getMethod(\"myMethod\");\n\n      Annotation a = m.getAnnotation(MyRepeatedAnnotations.class);\n      System.out.println(anno);\n    }\n    catch(NoSuchMethodException e) {\n      System.out.println(e);\n    }\n  }\n  public static void main(String[] args) {\n    myMethod();\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\n@MyRepeatedAnnotations(value={@MyWords(value=1, word=&#8221;Data&#8221;), @Words(value=2, word=&#8221;Flair&#8221;)})<\/p>\n<h3>Predefined\/ Standard Annotations in java<\/h3>\n<p>Java has six built-in annotations as follows:<\/p>\n<h3><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/05\/Predefined-Annotation.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-78952\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/05\/Predefined-Annotation.jpg\" alt=\"Predefined Annotations in java\" width=\"706\" height=\"402\" \/><\/a><\/h3>\n<h4><b>1) @Override<\/b><\/h4>\n<p>We should use @Override annotation while overriding a method in the child class to mark that method.<\/p>\n<p>This provides more readability to the code and avoids maintenance issues like you must change the signature in child classes (where we are using this annotation) while changing the method signature of the parent class otherwise, the compiler would throw compilation error.<\/p>\n<p>This is difficult to trace when you do not have used this annotation.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">class ParentClass {\n  public void display() {\n    System.out.println(\"Parent class display() method\");\n  }\n\n  public static void main(String args[]) {\n    ParentClass obj = new ChildClass);\n    obj.display();\n  }\n}\nclass ChildClass extends ParentClass {@Override\n  public void display() {\n    System.out.println(\"Child class display() method\");\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\nChild class display() method<\/p>\n<h4>2) @Deprecated<\/h4>\n<p>The @Deprecated annotation indicates that a marked class, method, or field is \u2018deprecated\u2019 and they are no longer in use. The compiler gives a warning message whenever there is a use of deprecated class, method, or field marked with the @Deprecated annotation in the program.<\/p>\n<p>When an element is deprecated, there is a need to document them using the Javadoc @deprecated tag. You should note that there is a difference between @Deprecated and @deprecated. @deprecated is for documentation purposes, and @Deprecated is for Annotations.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">public class Test {@Deprecated\n  public void display() {\n    System.out.println(\"display() method of Test class\");\n  }\n  public static void main(String args[]) {\n    Test obj = new DeprecatedTest();\n    obj.display();\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\ndisplay() method of Test class<\/p>\n<h4>3) @SuppressWarnings<\/h4>\n<p>The @SupressWarnings annotation instructs the compiler to ignore specific warnings.<\/p>\n<p>For example in the below code, We are calling a deprecated method so the compiler should generate a warning, however, we are using @SuppressWarnings annotation that would suppress that deprecation warning.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">class Test {@Deprecated\n  public void display() {\n    System.out.println(\"display() method of Test class\");\n  }\n}\n\npublic class SuppressWarningTest {@SuppressWarnings({\n    \"checked\",\n    \"deprecation\"\n  })\n  public static void main(String args[]) {\n    DeprecatedTest obj = new DeprecatedTest();\n    obj1.display();\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\ndisplay() method of Test class<\/p>\n<h4>4) @Documented Annotations in Java<\/h4>\n<p>The @Documented Annotation is a annotation that says a tool that there is a need for documenting an annotation. Annotations are not present in Javadoc comments.<\/p>\n<p>The @Documented annotation enables tools like Javadoc to process it and include the annotation type information in the generated document.<\/p>\n<h4>5) @Target<\/h4>\n<p>The design of Target annotation is such that we can use them only as an annotation to another annotation. @Target Annotation takes one argument and this argument must be a constant value from the ElementType enumeration.<\/p>\n<p>The following table shows the constants along with the type of the declaration to which they correspond.<\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400\">Target Constant<\/span><\/td>\n<td><span style=\"font-weight: 400\">Annotations applied to<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">ANNOTATION_TYPE<\/span><\/td>\n<td><span style=\"font-weight: 400\">Another annotation<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">CONSTRUCTOR<\/span><\/td>\n<td><span style=\"font-weight: 400\">Constructor<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">FIELD<\/span><\/td>\n<td><span style=\"font-weight: 400\">Field<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">LOCAL_VARIABLE<\/span><\/td>\n<td><span style=\"font-weight: 400\">Local variable<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">METHOD<\/span><\/td>\n<td><span style=\"font-weight: 400\">Method<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">PACKAGE<\/span><\/td>\n<td><span style=\"font-weight: 400\">Package<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">PARAMETER<\/span><\/td>\n<td><span style=\"font-weight: 400\">Parameter<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">TYPE<\/span><\/td>\n<td><span style=\"font-weight: 400\">Class, Interface, or enumeration<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>6) @Inherited<\/h4>\n<p>@Inherited is a marker annotation that we can use only on the annotation declaration. It affects only annotations used on class declarations. @Inherited annotation causes the subclass to inherit the annotation for a superclass.<\/p>\n<p>Therefore, whenever there is a request to a subclass for a specific annotation, and if the annotation is absent in the subclass, then it checks its superclass. If that annotation is present in the superclass, and if it is annotated with @Inherited, then it returns that annotation.<\/p>\n<h3>What\u2019s the use of Java Annotations?<\/h3>\n<h4>1. Instructions to the compiler<\/h4>\n<p>We can use the built-in annotation in Java to give instructions to the compiler. For example, the use of @override annotation is to instruct the compiler that the annotated method is overriding the method.<\/p>\n<h4>2. Compile-time instructors<\/h4>\n<p>Annotations provide compile-time instructions to the compiler that we can later use them using software build tools for generating XML files, code, etc.<\/p>\n<h4>3. Runtime instructions<\/h4>\n<p>We can define annotations so that they can be available at runtime and we can access them using Java reflection.<\/p>\n<h3>Where we can use Annotations in Java?<\/h3>\n<p>We can apply Annotations to classes, interfaces, methods, and fields. For example, we apply the override annotation to the below method:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">@Override\nvoid myMethod() \n{ \n    \/\/Do something \n}\n<\/pre>\n<p>This annotation is instructing the compiler that myMethod() is an overriding method that is overriding the method (myMethod()) of the superclass.<\/p>\n<h3>Conclusion<\/h3>\n<p>Hence, in this Java tutorial, we learned about annotation in java and types of annotation in Java. We discussed Marker, Single Value, Type, and Full Java Annotations.<\/p>\n<p>In addition, we also discussed Predefined\/ Standard or built-in annotations in Java. At last, we also learned the reasons to use Annotations and where to apply them.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our last tutorial, we studied Java Assertion in detail. In this Java Annotations tutorial, we will learn Java Annotation, how to apply them, and a list of annotations in Java Programming Language. For&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":78950,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[183],"tags":[2746,2747,2748,2749,2750],"class_list":["post-78895","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-annotation-in-java","tag-annotations-in-java","tag-java-annotation-example","tag-java-annotations","tag-types-of-annotations-in-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Annotations in Java - Types, Examples and Uses - TechVidvan<\/title>\n<meta name=\"description\" content=\"Annotations in java - What is java annotation with example, its use and types, Predefined annotations in java - @Override, @Deprecated, @SuppressWarnings\" \/>\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-annotations\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Annotations in Java - Types, Examples and Uses - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Annotations in java - What is java annotation with example, its use and types, Predefined annotations in java - @Override, @Deprecated, @SuppressWarnings\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/java-annotations\/\" \/>\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-06-01T04:30:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/05\/Java-Annotation.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":"Annotations in Java - Types, Examples and Uses - TechVidvan","description":"Annotations in java - What is java annotation with example, its use and types, Predefined annotations in java - @Override, @Deprecated, @SuppressWarnings","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-annotations\/","og_locale":"en_US","og_type":"article","og_title":"Annotations in Java - Types, Examples and Uses - TechVidvan","og_description":"Annotations in java - What is java annotation with example, its use and types, Predefined annotations in java - @Override, @Deprecated, @SuppressWarnings","og_url":"https:\/\/techvidvan.com\/tutorials\/java-annotations\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2020-06-01T04:30:00+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/05\/Java-Annotation.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-annotations\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-annotations\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Annotations in Java &#8211; Types, Examples and Uses","datePublished":"2020-06-01T04:30:00+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-annotations\/"},"wordCount":1287,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-annotations\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/05\/Java-Annotation.jpg","keywords":["Annotation in java","annotations in java","Java Annotation Example","Java Annotations","Types of Annotations in Java"],"articleSection":["Java Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/java-annotations\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/java-annotations\/","url":"https:\/\/techvidvan.com\/tutorials\/java-annotations\/","name":"Annotations in Java - Types, Examples and Uses - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-annotations\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-annotations\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/05\/Java-Annotation.jpg","datePublished":"2020-06-01T04:30:00+00:00","description":"Annotations in java - What is java annotation with example, its use and types, Predefined annotations in java - @Override, @Deprecated, @SuppressWarnings","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/java-annotations\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/java-annotations\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/java-annotations\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/05\/Java-Annotation.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/05\/Java-Annotation.jpg","width":802,"height":420,"caption":"Java Annotation"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/java-annotations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Annotations in Java &#8211; Types, Examples and Uses"}]},{"@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\/78895","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=78895"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/78895\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/78950"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=78895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=78895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=78895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}