What is the correct way to write comment
if you have a short comment to write then you use
// followed by statements
//this is a single line comment if you want to comment on another line you //will have to start it with // too
but if you comment is an entire paragraph with line breaks then you begin with
/* and end your paragraph with
/* this is a multi-line comment Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec velit neque, auctor sit amet aliquam vel, ullamcorper sit amet ligula. Nulla porttitor accumsan tincidunt. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Quisque velit nisi, pretium ut lacinia in, elementum id enim. */
hi */ System.out.println("Noise!");
how can i do this exercise?
1.The statement on line 4 prints out Noise!. Ask Java to ignore it by commenting it out. Place two forward slashes (//) at the beginning of line 4.
a multi-line comment that begins anywhere after the single line comment
you just wrote. Again, the comment can say anything you like.
@rydan has provided you with the neccecary skills to acomplish that. look over his notes in post #2.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.