Java Comments
From Fortis
Comments in Java
Single Line Comments:
Everything between // and \n
Types of Single Comment Formatting
1. Column
Text // Comment1 Text Text // Comment2 Text Text Text // Comment3 Text Text Text // Comment4 Text Text // Comment5 Text Text // Comment6
Translated Text:
Text // Comment1 Text Text // Comment2 Text Text // Comment3 Text Text Text Text Text // Comment4 Text Text // Comment5 Text Text // Comment6
Problem:
- Each line in one segment, or all in one segment?
- Preserve alignment
Data: - "Distance" between whitespace and comment - Column of comment's start
2. Boxed Column
Text // ---------------------- // Or any other random mark Text Text // Comment2 Comment2 // Text Text Text // Comment3 Comment3 // <-- or some other random end Text Text Text // Comment4 // Text Text // Comment5 // Text Text // --------------------- //
Translated Text:
Text // ---------------------- // Text Text // Comment2 Comment2 Comment2 // Text Text Text // Comment3 // Text Text Text // Comment4 // Text Text // Comment5 // Text Text // --------------------- //
Problem:
- Each line in one segment, or all in one segment?
- Preserve alignment
Data: - "Distance" between whitespace and comment - Column of comment's start - Column of comment's end - Identify start common symbol - Identity end symbol - Word wrap text?
Multi Line Comments:
Everything between /* and */