

{"id":12519,"date":"2018-04-06T09:58:19","date_gmt":"2018-04-06T09:58:19","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=12519"},"modified":"2026-05-16T17:47:55","modified_gmt":"2026-05-16T12:17:55","slug":"java-comments","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/java-comments\/","title":{"rendered":"3 Types of Comments in Java &#8211; Why comments are Important?"},"content":{"rendered":"<p><strong>Java Comments<\/strong> <em>are used in programs to make the code more understandable.<\/em> Therefore, comments in Java (remarks) make a program more intelligible as they set out the details of the code. However, appropriate utilization of remarks also makes support simpler and helps discover bugs effectively. The compiler disregards the comment while aggregating code, i.e., the compiler won\u2019t read them because these statements are non-executable.<\/p>\n<p>However, we are going to discuss different types of Java comments with their syntax and examples. Last but not least, we will cover the complete table of comments used in Java.<\/p>\n<p>Let&#8217;s take the driving seat and speed up your programming skills.<\/p>\n<p><em><strong>To master the concept of comments, you should know the<a href=\"https:\/\/data-flair.training\/blogs\/basic-java-syntax\/\"> Basic Java Syntax<\/a>.<\/strong><\/em><\/p>\n<h3>Types of Comments in Java<\/h3>\n<p>There are three types of Java comments:<\/p>\n<h4>Single-line Comments in Java<\/h4>\n<p>These are used when the comment written is short or a one-liner. Therefore, the single-line comment in Java is denoted by using two forward slashes before a statement.<\/p>\n<p><strong>Syntax of single-line comments in Java<\/strong><\/p>\n<pre>\/\/ A comment is written here<\/pre>\n<p><strong>Example of Java single-line comment:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">class Scomment\r\n{\r\n\u00a0\u00a0\u00a0 public static void main(String args[])\r\n\u00a0\u00a0\u00a0 {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ Single line comment here\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(\"Single line comment above\");\r\n\u00a0\u00a0\u00a0 }\r\n}<\/pre>\n<h4>Multi-line Comments in Java<\/h4>\n<p>Whenever we need to explain a procedure, we use Java multiline comments. Whereas single-line comments become tedious in this case, as we will need to write \u2018\/\/\u2019 at the start of every line, therefore we use multiline comments in Java.<\/p>\n<p><strong>Syntax of multi-line comment in Java-<\/strong><\/p>\n<pre>\/*Comment starts\r\ncontinues\r\ncontinues\r\n.\r\n.\r\n.\r\nComment ends*\/<\/pre>\n<p><em><strong>Let&#8217;s take a break and learn <\/strong><\/em><a href=\"https:\/\/data-flair.training\/blogs\/java-class-and-object\/\"><em><strong>Classes and Objects in Java<\/strong><\/em><\/a>.<\/p>\n<p><strong>Example of multi-line comment in Java:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">class Scomment\r\n{\r\n\u00a0\u00a0\u00a0 public static void main(String args[])\r\n\u00a0\u00a0\u00a0 {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(\"Multi line comments below\");\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/*Comment line 1\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Comment line 2\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Comment line 3*\/\r\n\u00a0\u00a0\u00a0 }\r\n}<\/pre>\n<h4>Documentation Comments in Java<\/h4>\n<p>Although this kind of Java comment is utilized by large code for a programming bundle since it produces a documentation page for reference, which can be utilized for getting data about strategies, their parameters, and so forth.<\/p>\n<p><strong>Syntax of Java documentation comments &#8211;<\/strong><\/p>\n<pre>\/**Comment start\r\n*\r\n*tags are used in order to specify a parameter\r\n*or method or heading\r\n*HTML tags can also be used\r\n*such as &lt;h1&gt;\r\n*\r\n*comment ends*\/<\/pre>\n<p><strong>Example of documentation comment in Java<\/strong><strong>\u00a0<\/strong><strong>\u2013<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package JavaCommentsDemo;\r\n\/\/Program to illustrate comments in Java\r\n\/**\r\n* &lt;h1&gt;Find sum of two numbers!&lt;\/h1&gt;\r\n* FindSum program finds the sum\r\n*and gives the output on\r\n*the screen.\r\n*\r\n* @author  dataflair\r\n*\/\r\npublic class FindSum \r\n{\r\n\t\/**\r\n\t    * Method to find average\r\n\t    * @param numA- This is the first parameter to calculateSum method\r\n\t    * @param numB - This is the second parameter to calculateSum method\r\n\t    *\/\r\n\tint numA;\r\n\tint numB;\r\nFindSum(int numA,int numB)\r\n{\r\n\tthis.numA=numA;\r\n\tthis.numB=numB;\r\n}\r\nvoid calculateSum()\r\n{\r\n\tSystem.out.println(\"Sum of two numbers is \"+(numA+numB));\r\n}\r\nstatic class Test\r\n{\r\n\tpublic static void main(String args[])\r\n\t{\r\n\t\tFindSum obj=new FindSum(10,20);\r\n\t\tobj.calculateSum();\r\n\t}\r\n}\r\n}<\/pre>\n<p><em><strong>Recommended Reading &#8211;\u00a0<a href=\"https:\/\/data-flair.training\/blogs\/java-data-types\/\">Primitive &amp; Non-Primitive Data types with Examples<\/a><\/strong><\/em><\/p>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/FindSum.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-63685 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/FindSum.jpg\" alt=\"FindSum\" width=\"1307\" height=\"741\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/FindSum.jpg 1307w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/FindSum-150x85.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/FindSum-300x170.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/FindSum-768x435.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/FindSum-1024x581.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/FindSum-520x295.jpg 520w\" sizes=\"auto, (max-width: 1307px) 100vw, 1307px\" \/><\/a><\/p>\n<h3>Benefits of Using Comments in Java<\/h3>\n<p>However, there are several advantages of using comments in your Java code:<\/p>\n<p><strong>1. Enhanced Code Readability:<\/strong> Comments act as explanatory notes, making your code easier to understand for yourself and others. Therefore, well-placed comments can clarify complex logic, the purpose of variables and methods, and the overall program flow. However, this is especially beneficial when revisiting your code after some time or collaborating with other programmers.<\/p>\n<p><strong>2. Improved Maintainability:<\/strong> Comments can significantly simplify code maintenance. Wherever Codebases evolve, modifications become more manageable when the code is well-commented. Hence, Comments explain the reasoning behind specific code sections, making it easier for developers to understand the intent and adjust the code as needed.<\/p>\n<p><strong>3. Efficient Debugging:<\/strong> Also, comments can aid in debugging by providing clues about the expected behavior of different code sections. However, when an error arises, tracing the code&#8217;s execution with the help of comments can streamline the troubleshooting process. Therefore, comments can also indicate potential issues or areas for improvement.<\/p>\n<p><strong>4. Future Updation:<\/strong> Adding a comment to your code simplifies making the changes. Therefore, it helps to switch to the particular part of the program rather than understanding the whole code. Hence, For future use it becomes easier for other programmers to understand the program and make updates.<\/p>\n<h3>Table of Java Comments<\/h3>\n<table>\n<tbody>\n<tr>\n<td><strong>Tag<\/strong><\/td>\n<td><strong>Description<\/strong><\/td>\n<td><strong>Syntax<\/strong><\/td>\n<\/tr>\n<tr>\n<td>@serialField<\/td>\n<td>Used to document an ObjectStreamField component<\/td>\n<td>@serialField field-name field-type field-description<\/td>\n<\/tr>\n<tr>\n<td>@since<\/td>\n<td>Adds a \u201cSince\u201d heading to the generated document.<\/td>\n<td>@since release<\/td>\n<\/tr>\n<tr>\n<td>@throws<\/td>\n<td>Synonym to @since<\/td>\n<td>@throws class-name description<\/td>\n<\/tr>\n<tr>\n<td>{@value}<\/td>\n<td>When {@value} is used in the comment of the document of a static field, it displays the value of that constant.<\/td>\n<td>{@value package.class#field}<\/td>\n<\/tr>\n<tr>\n<td>@version<\/td>\n<td>This <a href=\"https:\/\/en.wikipedia.org\/wiki\/Method_(computer_programming)\">method<\/a> adds a \u201cVersion\u201d subheading along with the specified version-text to the generated docs when the -version option is used.<\/td>\n<td>@version version-text<\/td>\n<\/tr>\n<tr>\n<td>{@link}<\/td>\n<td>This method inserts an in-line link with the visible text label that points to the documentation for the specified package, class, or member name of a referenced class.<\/td>\n<td>{@link package.class#member label}<\/td>\n<\/tr>\n<tr>\n<td>{@linkplain}<\/td>\n<td>Identical to {@link}, except the link\u2019s label is displayed in plain text than code font.<\/td>\n<td>{@linkplain package.class#member label}<\/td>\n<\/tr>\n<tr>\n<td>@param<\/td>\n<td>Adds a parameter with the specified parameter-name followed by the specified description to the \u201cParameters\u201d section.<\/td>\n<td>@param parameter-name description<\/td>\n<\/tr>\n<tr>\n<td>@return<\/td>\n<td>This method adds a \u201cReturns\u201d section with the description text.<\/td>\n<td>@return description<\/td>\n<\/tr>\n<tr>\n<td>@see<\/td>\n<td>This method adds a \u201cSee Also\u201d heading with a link or text entry that points to reference.<\/td>\n<td>@see reference<\/td>\n<\/tr>\n<tr>\n<td>@serial<\/td>\n<td>This method is used in the document comment for a default serializable field.<\/td>\n<td>@serial field-description | include | exclude<\/td>\n<\/tr>\n<tr>\n<td>@serialData<\/td>\n<td>This method documents the data written by the writeObject( ) or writeExternal( ) methods.<\/td>\n<td>@serialData data-description<\/td>\n<\/tr>\n<tr>\n<td>@author<\/td>\n<td>It is used to add the author of a class.<\/td>\n<td>@author name-text<\/td>\n<\/tr>\n<tr>\n<td>{@code}<\/td>\n<td>It displays text in code font without interpreting the text as HTML markup or nested javadoc tags.<\/td>\n<td>{@code text}<\/td>\n<\/tr>\n<tr>\n<td>{@docRoot}<\/td>\n<td>This method is used to represent the path relative to the generated root directory page<\/td>\n<td>{@docRoot}<\/td>\n<\/tr>\n<tr>\n<td>@deprecated<\/td>\n<td>This method adds a comment indicating that this API should be discontinued<\/td>\n<td>@deprecated deprecatedtext<\/td>\n<\/tr>\n<tr>\n<td>@exception<\/td>\n<td>It adds a\u00a0Throws\u00a0subheading to the generated documentation, with the classname and description text.<\/td>\n<td>@exception class-name description<\/td>\n<\/tr>\n<tr>\n<td>{@inheritDoc}<\/td>\n<td>Used to inherit the comment from the implementable interface or the nearest inheritable class.<\/td>\n<td>Inherits a comment from the immediate surperclass.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Summary<\/h3>\n<p>As a result, Comments in Java are used to provide some extra information about the code. Single-line, multi-line, and documentation are the three ways to present the comments in Java. Although these are optional, the programmer is not bound to use them. Hence, the remarks are only for providing a better understanding of the code.<\/p>\n<p><em><strong>Now, it&#8217;s the right time to discuss <a href=\"https:\/\/data-flair.training\/blogs\/variables-in-java\/\">Variables in Java\u00a0<\/a><\/strong><\/em><\/p>\n<p>Hope you like the explanation. Please share your experience in our comment section.<span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:2002,&quot;href&quot;:&quot;https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/Method_(computer_programming)&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251007155052\\\/https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/Method_(computer_programming)&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-10 16:45:11&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-24 09:02:22&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-01 13:57:54&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-01-13 12:32:25&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-18 06:02:37&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-22 02:40:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-25 07:29:05&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-28 16:42:47&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-03 22:34:35&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-07 04:32:46&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-13 04:31:15&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-19 22:09:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-23 06:43:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-27 15:15:13&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-05 10:33:18&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-11 16:35:13&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-15 07:23:04&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-19 18:57:35&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-22 21:22:46&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-06 04:07:20&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-21 22:26:04&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-28 02:15:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-07 12:30:00&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-25 03:03:07&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-09 07:51:11&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-13 09:42:28&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-13 09:42:28&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Java Comments are used in programs to make the code more understandable. Therefore, comments in Java (remarks) make a program more intelligible as they set out the details of the code. However, appropriate utilization&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":64101,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[4291,20657,20659,20658],"class_list":["post-12519","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-example-of-java-comments","tag-java-documentation-comments","tag-java-multi-line-comments","tag-java-single-line-comments"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>3 Types of Comments in Java - Why comments are Important? - DataFlair<\/title>\n<meta name=\"description\" content=\"Java comments are non-executable statements, used to understand Code better. Learn different types of Java comments Single, multi-line, documentation\" \/>\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\/java-comments\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"3 Types of Comments in Java - Why comments are Important? - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Java comments are non-executable statements, used to understand Code better. Learn different types of Java comments Single, multi-line, documentation\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/java-comments\/\" \/>\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-06T09:58:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-16T12:17:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/Types-of-comments-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=\"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=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"3 Types of Comments in Java - Why comments are Important? - DataFlair","description":"Java comments are non-executable statements, used to understand Code better. Learn different types of Java comments Single, multi-line, documentation","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\/java-comments\/","og_locale":"en_US","og_type":"article","og_title":"3 Types of Comments in Java - Why comments are Important? - DataFlair","og_description":"Java comments are non-executable statements, used to understand Code better. Learn different types of Java comments Single, multi-line, documentation","og_url":"https:\/\/data-flair.training\/blogs\/java-comments\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-04-06T09:58:19+00:00","article_modified_time":"2026-05-16T12:17:55+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/Types-of-comments-in-Java.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":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/java-comments\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/java-comments\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"3 Types of Comments in Java &#8211; Why comments are Important?","datePublished":"2018-04-06T09:58:19+00:00","dateModified":"2026-05-16T12:17:55+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/java-comments\/"},"wordCount":944,"commentCount":13,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/java-comments\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/Types-of-comments-in-Java.jpg","keywords":["example of Java Comments","Java Documentation Comments","Java Multi-line Comments","Java Single line Comments"],"articleSection":["Java Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/java-comments\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/java-comments\/","url":"https:\/\/data-flair.training\/blogs\/java-comments\/","name":"3 Types of Comments in Java - Why comments are Important? - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/java-comments\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/java-comments\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/Types-of-comments-in-Java.jpg","datePublished":"2018-04-06T09:58:19+00:00","dateModified":"2026-05-16T12:17:55+00:00","description":"Java comments are non-executable statements, used to understand Code better. Learn different types of Java comments Single, multi-line, documentation","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/java-comments\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/java-comments\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/java-comments\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/Types-of-comments-in-Java.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/Types-of-comments-in-Java.jpg","width":802,"height":420,"caption":"Types of Comments in Java"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/java-comments\/#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":"3 Types of Comments in Java &#8211; Why comments are Important?"}]},{"@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\/12519","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=12519"}],"version-history":[{"count":17,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/12519\/revisions"}],"predecessor-version":[{"id":148306,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/12519\/revisions\/148306"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/64101"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=12519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=12519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=12519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}