Question: How do I create a comment in Java?
Answer: There are two ways to create Java comments, and both are shown in the example code below:
// this is a one-line comment /** * this is also * a comment, but it can span multiple * lines. */
// syntax makes everything after it on the current line a Java comment, and the
/** ... */ syntax lets you create multi-line Java comments.
There’s just one person behind this website; if this article was helpful (or interesting), I’d appreciate it if you’d share it. Thanks, Al.