Comments

Definition & Meaning

in Java meaning

Last updated 23 month ago

What are Comments (in Java)?

What does in Java stand for?

Comments, in Java, explain the moves of a particular piece of Code. They are used to provide a precis of the code in plain English to help future Developers better apprehend the code.

What Does Comments Mean?

There are five varieties of remarks in Java:

Block comments deliver a Record or technique assessment and additionally can be used inside a Method. A bLock comment method is declared as follows: /* *block remark describing the assessment of the code. */

Single-line Feedback are brief comments that can be written in a unmarried line. If a unmarried-line remark does now not healthy within the same line, a block comment ought to be used. The following is an Instance of a single-line remark: If (conditional assertion) /* execution of conditional assertion*/ … /* is the Delimiter for a unmarried-line comment.

Trailing remarks are very short comments written within the identical line of code this is being described. The delimiters are /*…*/.

End of line comments are written on the end of the road, and the delimiter is //.

Documentation remarks, written before the Declaration, are used to give an explanation for Java Interfaces, instructions, Constructors, methods and Fields. The delimiters are /**…*/.

Share Comments article on social networks

Your Score to Comments article

Score: 5 out of 5 (1 voters)

Be the first to comment on the Comments

1718- V5

tech-term.com© 2023 All rights reserved