Computer Science, asked by Astha2808, 1 year ago

difference between single line comment and multi line comment


I know it's boring but plz help me,​


Michael12: i know
Michael12: answer
Astha2808: u will tell?
Michael12: no
Michael12: question
Michael12: is
Michael12: @borning
Astha2808: ya mans r boring just like u
LilyWhite: wt's the answer then
Michael12: hmm

Answers

Answered by Anonymous
14

hey....

⚫Single line comment

The simplest comment in Java is the single line comment. It starts with two forward slashes and continues to the end of the line. For example: // this is a single-line comment x = 1; // a single-line comment after code.

⚫Multi line comment

Comments are used to remind yourself and to inform others about the function of your program. Multiline comments are used for large text descriptions of code or to comment out chunks of code while debugging applications. Comments are ignored by the compiler. Syntax. /* comment */.

Answered by LilyWhite
29

In single line comment only we can comment only 1 line words not much large words .

Eg :- Hi , How are You ? etc .

Multi line comment means we can comment many words at a time and can be commented differently too with different front style .

Eg:- size of letters, front style etc .


LilyWhite: tq
Similar questions