Bifalgorithm post · Computer science one · Comments

How are comments written and processed in Java?

How are comments written and processed in Java? (Computer science one · Comments) — "Comments can be written in a Java program either as a single line using tw…

Ideas in this flowchart

  • Comments in a Java program are ignored during execution.
  • Java supports two comment formats.
  • Single-line comments begin with two forward slashes: //comment.
  • Everything after the two slashes on that line is ignored.
  • Multiline comments begin with /* and end with */.
  • Everything between /* and */ is ignored.
  • Comments do not affect the final executable code.
  • The amount of comments has no effect on the final executable code.
Feed/

How are comments written and processed in Java?

No cover

Channel

Computer science one

1 page

"Comments can be written in a Java program either as a single line using two forward slashes, //comment or as a multiline comment using a combination of forward slash and asterisk: /* comment */ . With a single line comment, everything on the line after the forward slashes is ignored. With a multiline comment, everything in between the forward slash/asterisk is ignored. Comments are ultimately ignored so the amount of comments do not have an effect on the final executable code. Consider the following example. 389"

Flowchart preview
👍
0
0 comments0 shares

Sign in to view and post comments.