हिंदी

Explain the REMARK statement in Java.

Advertisements

प्रश्न

Explain the REMARK statement in Java.

स्पष्ट कीजिए
Advertisements

उत्तर

A Remark Statement in Java is used to write comments or explanatory notes in a program. These statements are ignored by the Java compiler and do not affect the execution of the program. They help programmers understand the program easily.

Java supports three types of remark statements:

  1. Single-Line Comment (//): It is used to write a comment on a single line.
    Example: // This is a single-line comment
  2. Multi-Line Comment (/* ... */): It is used to write comments that extend over multiple lines.
    Example: /* This is a multi-line comment */
  3. Documentation Comment (/** ... */): It is used to provide documentation about classes, methods and other program elements.
    Example: /** This is a documentation comment */
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 3: Programming in Java (Review of Class XI Sections B and C) - EXERCISE [पृष्ठ ९८]

APPEARS IN

धीरज मेहरोत्रा Computer Science [English] Class 12
अध्याय 3 Programming in Java (Review of Class XI Sections B and C)
EXERCISE | Q 20. | पृष्ठ ९८
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×